It also saves you time and effort on having to retype the codes if you have deleted it in the first place.Ĥ) What is the equivalent code of the following statement in WHILE LOOP format? } 5) What is a stack? A stack is one form of a data structure.ĭata is stored in stacks using the FILO (First In Last Out) approach.
The idea is that if the code is in fact correct, you simply remove the comment symbols and continue on. How does this aid in debugging? Placing comment symbols /* */ around a code, also referred to as “commenting out”, is a way of isolating some codes that you think maybe causing errors in the program, without deleting the code. 3) Some coders debug their programs by placing comment symbols on some codes instead of deleting it. Also, under Call by Value, the value in the parameter is not affected by whatever operation that takes place, while in the case of Call by Reference, values can be affected by the process within the function. When using Call by Value, you are sending the value of a variable as parameter to a function, whereas Call by Reference sends the address of the variable. 2) What is the difference between Call by Value and Call by Reference? In the case of “x++”, another way to write it is “x = x +1”. Another way of writing increment statements is to use the conventional + plus sign or – minus sign. Likewise, the statement “x –” means to decrement the value of x by 1. For example, the statement “x++” means to increment the value of x by 1.
One is to use the increment operator ++ and decrement operator –. How one byte variables can stores two byte character constant? What is automatic type promotion in c? Swap two variables without using third variable. In the following declaration statement char c='A' Variable c stores one byte of memory space while character constants 'A' stores one byte memory space.
#C debugging questions pdf pdf
Important C++ Aptitude Questions and Answers for Fresher's with pdf on 'OOPS concept' including Advanced C++ Questions and Basic C++ Questions. 1) How do you construct an increment statement or decrement statement in C? There are actually two ways you can do this.