What does the following declaration mean?int (*ptr)[10]; ptr is an array of 10 integers ptr is array of pointers to 10 integers ptr is a pointer to an array of 10 integers ptr is an pointer to array TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ int i=5, j=6, z; printf("%d", i+++j);} 11 None of These 13 12 TRUE ANSWER : ? YOUR ANSWER : ?
Which of the following is a complete function? None of these int funct(); int funct(int x) { return x=x+1; } void funct(int) { printf(“Hello"); } void funct(x) { printf(“Hello"); } TRUE ANSWER : ? YOUR ANSWER : ?
short testarray[4][3] = { {1}, {2,3}, {4,5,6}};printf("%d", sizeof(testarray));Assuming a short is two bytes long, what will be printed by the above code? 7 12 It will not compile because not enough initializers are given 6 24 TRUE ANSWER : ? YOUR ANSWER : ?
Given b=110 and c=20, what is the value of 'a' after execution of the expression a=b-=c*=5? 10 -10 110 450 -110 TRUE ANSWER : ? YOUR ANSWER : ?
What is the right choice, if the following loop is implemented?void main(){ int num = 0; do{ --num; printf("%d", num); }while( ++num >= 0 );} Prints the value of 0 one time only. A run time error will be generated. The loop will run infinitely many times. There will be a compilation error reported. The program will not enter into the loop. TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following code?#includevoid main(){ int s=0; while(s++<10) { if(s<4 && s<9) continue; printf("%dt", s); }} 1 2 3 4 5 6 7 8 9 1 2 3 10 4 5 6 7 8 9 None of these 4 5 6 7 8 9 10 TRUE ANSWER : ? YOUR ANSWER : ?
A function 'p' that accepts a pointer to a character as argument and returns a pointer to an array of integer can be declared as int *p(char *)[] None of these. int(*p(char *))[] int (*p) (char *)[] TRUE ANSWER : ? YOUR ANSWER : ?
Comment on the following pointer declaration?int *ptr, p; ptr and p both are not pointers to integer. ptr is a pointer to integer, p is not. ptr is pointer to integer, p may or may not be. ptr and p, both are pointers to integer. TRUE ANSWER : ? YOUR ANSWER : ?
What's wrong in the following statement, provided k is a variable of type int?for(k = 2, k <=12, k++) The increment should always be ++k . The commas should be semicolons. The variable k can’t be initialized. There should be a semicolon at the end of the statement. The variable must always be the letter i when using a for loop. TRUE ANSWER : ? YOUR ANSWER : ?