tacticalfull.blogg.se

C debugging questions pdf
C debugging questions pdf














(17) What will be output if you will compile and execute the following c code?Įxp:where i+1 will return 3 but still i is 2 (16) What will be output of the following c program? ++ operator have high priority than + so all ++ operator will perform first after that it will like (15) What will be output if you will compile and execute the following c code?

C DEBUGGING QUESTIONS PDF CODE

(14) What will be output if you will compile and execute the following c code?Ĭhar *cricket= Įxp: in the above code cricket will be “clarke” and cricket will be “kallis”Īnd *++ptr denotes the second character in the string that is ‘l’ (13) What will be output if you will compile and execute the following c code? (12) What will be output if you will compile and execute the following c code?Įxp: we cant allocate value for a static variable dynamically (11) What will be output if you will compile and execute the following c code?Įxp: printf() always returns true if it prints somethink (10) What will be output if you will compile and execute the following c code?Įxp:the macro call() will return the string as it is (9) What will be output if you will compile and execute the following c code?Įxp: If you want to write macro constant in new line the end with the character \. (8) What will be output if you will compile and execute the following c code? (1,2) comma operator will lead to right most one so it returns 2 (7) What will be output if you will compile and execute the following c code?Įxp:1,2 will think as array and awhich is same as a will be assigned as 1 Printf(“%d %d”,sizeof(“string”),strlen(“string”)) Įxplanation: char has memory of 1 byte so sizeof(“string”)=>7 including null char strlen(“string”)=>6 which is the length. (6) What will be output if you will compile and execute the following c code? While performing 3 left shift value becomes => 111111 111110 => -2 (2) What will be output if you will compile and execute the following c code? (1) What will be output if you will compile and execute the following c code?Įxp: Binary value of 2: 00000010 (Select three two bit) Here i have attached some important and most continuously asked C and C++ questions, which will be very useful in any scenario. C C++ Aptitude questions c c++ aptitude questions answers














C debugging questions pdf