C Programming Questions & Answers: part7



Software Programming : C Programming QUESTIONS AND ANSWERS :: part7 : 11 to 15

Following Software Programming language Entrance Multiple choice objective type questions and answers will help you in Software Programming 2024 examinations :

11.Which one of the following will declare a pointer to an integer at address 0x200 in memory?

int *x;
0x200;
int *x = &0x200;
int *x = *0x200;
x = 0x200;

12.char *ptr; char myString[] = �abcdefg�; ptr = myString; ptr += 5; what string does ptr point to in the sample code above?

fg
efg
defg
cdefg
bcdefg.

13.With every use of a memory allocation function, what function should be used to release allocated memory, which is no longer needed? #122. With every use of a memory allocation function, what function should be used to release allocated memory, which is no longer needed?

unalloc()
dropmem()
dealloc()
release()
free().

14.Consider the following code: void main() {int a[5] = {6,8,3,9,0}, i=0; if (i != 0) { break;printf(�%d�, a[i]); } elseprintf(�%d�, a[i++]); } What is the output of the above program?

6
8
Runtime error
No output
Syntax error.

More C Programming QUESTIONS AND ANSWERS available in next pages

    Health is the greatest gift, contentment is the greatest wealth -Buddha
Opportunity is missed by most people because it is dressed in overalls and looks like work.- Thomas Edison