Single Choice Not Set

QWhat will be the output of the following program?
#include"stdio.h"
main()
{
 int a[] = {2, 9, 3.6, 8, 9.7, 5.8};
 int j, *q = a;
 for(j=0; j<5; j++)
 {
 printf("\t%d", *q) ;
 q++;
 }
 
}
 

ID: #1273 Pointer in C Language 1,296 views
Question Info
#1273Q ID
Not SetDifficulty
Pointer in C LanguageTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A 2 2 2 2 2 ✔ ✖
  • B 2 3 8 9 5 ✔ ✖
  • C Compile time error ✔ ✖
  • D Unexpected results ✔ ✖
Correct Answer

Explanation

2 3 8 9 5

Share This Question

Challenge a friend or share with your study group.