Given the following array: int a[8] = {1,2,3,4,5,6,7,0}; what would be the output of printf("%d",a[4]); ?
Correct Answer: 5
Explanation:
Note: This Question is unanswered, help us to find answer for this one
C Programming Skill Assessment
Your Skill Level: Poor
Retake Quizzes to improve it
More C Programming MCQ Questions
Following code snippet? void main() { int num1 = 30, num2 = 4; float result; result = (float)(num1/num2); printf('%.2f', result); return 0; }
Consider the following code. int i = 4, *j, *k; Which one of the following statements will not work?
What is wrong with the following statement? int func();
The declaration int (*p[5])() means:
Which statements is/are valid and correct? 1.char amessage[] = 'Imnop'; amessage++; 2.char *pmessage = 'abcde'; (*pmessage)++; 3.char amessage[] = 'lmnop'; (*amessage)++; 4.char *pmessage = 'abcde'; pmessage++;
Output of this C code (if run with no options or arguments)? #include int main(intargc, char *argv[]) { printf('%d\n', argc); return 0; }
Assuming integer is 4 bytes long and the address for 'i' is 2000, Output for the following code? int main() { int ***foo, **bar, *foobar, i=5; foobar = &i; bar = &foobar; foo = &bar; printf('%d, %d, %d\n', *foobar, **bar, ***foo); return 0; }
Assuming integer takes 4 bytes and the starting address of the array 'foo' is 2000, Output of the following code? int main() { int foo[2][3][4][5]; foo[2][3][4][5] = 50; printf('%d',*(*(*(*(foo+2)+3)+4)+5)); return 0; }
If short takes 2 bytes of memory, Output of the following program? int main () { short foobar[2][3] = { {1,5}, {9,8,7}}; printf('%d', sizeof(foobar)); return 0; }
Which statement is correct? Check all that apply.