CS201 GDB No 1 Fall 2017
Dear Students, CS201 GDB Solution has been added. Here you can read or Download CS201 - introduction to programming Graded Discussion Board GDB No 1 Solution and Discussion of Semester Fall 2017. GDB Due Date is 11 January 2018. We are here to facilitate your learning and we do not appreciate the idea of copying or replicating solutions. Previously we shared MTH302 GDB No 1 Solution Fall 2017.CS201 GDB No 1 Discussion and Solution Fall 2017 |
CS201 GDB No 1
Suppose you are required to write a C/C++ program for a bank in which all transactions of a day will be compared. Keep in mind a huge volume of transactions per day:Your code should have following features:
- The processing speed must be high.
- The logic of the program must be simple.
- Which decision structure (if-else and switch statement) would you choose to achieve above mentioned features of code, and also mention reasons in favor of your choice.
Recommended : CS201 Final Term Past Papers Solved by Waqar Siddhu
in my opinion switch statement is better than multiple if-else statements when we are using same variable in the case of multiple conditional expressions. By this we can decrease our code length. Switch statement will be use to for efficiency and to reduce extra processing. as If else is not suitable where more than 5 comparisons exist. if we use if Else it will take extra processing cast resulting slow processing.
Or
Switch statements have its best uses hen there are more conditions because as we know that if statements check for all the conditions and then when the condition is matched then the following body inside it is executed but this is not the case with switch condition as it directly checks for the compatible conditions and execute the code.
CS201 GDB No 1 Solution Fall 2017
Solution idea by : Muhammad Zubair
Or
Switch statements have its best uses hen there are more conditions because as we know that if statements check for all the conditions and then when the condition is matched then the following body inside it is executed but this is not the case with switch condition as it directly checks for the compatible conditions and execute the code.
You can just take the idea and write in Your own words we strongly Recommend you to do not copy paste kindly. we will not be responsible in case of zero marks.
If You have also already solved the GDB. Please share your thoughts in comments section below.
Recommended : CS201 Solved Subjective Past Paper for Final Term
If GDB Solution provided by (Virtual Study Solutions) was helpful. Please Share it with your friends. You can also like our Facebook Page or Subscribe Us below for Updates. Thank You.
Recommended : CS201 Solved Subjective Past Paper for Final Term
If GDB Solution provided by (Virtual Study Solutions) was helpful. Please Share it with your friends. You can also like our Facebook Page or Subscribe Us below for Updates. Thank You.
Do we not have to type a c++Program for the answer or just answer that which statement is better plz reply as fast as you can
ReplyDeleteyes, you don't have to write c++ code. just write answer in your words.
DeleteBest work.
ReplyDeleteCan you upload every Assignments, Quizzes & GDB solutions?
And also can you tell me which theme you use for this blog?