Sunday 7 January 2018

CS201 GDB Solution 2018


Qustion is;
                  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.
[Note: Answer must be comprehensive with logical reasoning. Confine your answer within 3 to 5 lines]



solution is here,


Switch statement is better than multiple if-else statements. When we ae using same variables i case of multiple conditional expressions. Switch statement will be use to for efficiency and to reduce extra processing. as we now that if-else statement is not suitable for mentioned condition because in if-else more than 5 comparison exist. if we use if-else, it will be take extra processing. More time nd processing will be slow. 

2 comments:

  1. please upload cs202 assignment no 2 solution

    ReplyDelete
    Replies
    1. Dear Iqra sorry for the late reply

      Actually i am preparing for my final terms therefor i can't reply you

      can you tell me the last date for and also sent file

      Delete

Featured Post

All Answers of Quiz regarding to this course on Fiverr "Online Freelancing Essentials: Be A Successful Fiverr Seller"

To Clear All quiz of mentioned Course you can have a look on or check questions answers as well. Course name:  Online Freelancing Essentials...

Popular Posts