aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Java
  • Consider the following 'C' code and write the output obta...
Multiple choice

Consider the following 'C' code and write the output obtained.int a[3][3] = {{1,2,3,4},{5,6,7,8}}; printf(%d,a[0][2]);

  1. 1

  2. 2

  3. 3

  4. 4

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

This is the correct option as this value is stored in the array subscript a[0][2].

Keep practicing — related questions

  • What will be the output of the following function? # include <stdio.h> void main() { int a[5] = {5,1,15,20,...
  • What is the result of the following program? int a[2][2][2] = { 10, 2, 3, 4, 5, 6, 7, 8 }; printf("%d",***a);
  • The output of the following program is main() { int a, b, c; int num[3][4]= {1,2,3,4,5,6,7,8,9,10,11,12}; f...
  • What would be the output of the following program? main() { int a[5] = {2,3};; printf("\n%d %d %d", a[2],a[...
  • What will be the output of the following code segment? #include #include void main() { int a[]={0,1,2,3,4,5...
  • What will be output if you will execute following c code? #include #include void main() { int a[]={0,1,2,3,...
  • void main() { int a[2][3]={{1,2,3},{4,5,6}}; printf("%d\n",++**(a+1)); }
  • What is the output ?main(){ int a[5]={1,2,3,4,5}; a[7] = 23; printf("%d", a[7]);}
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy