[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

C Programming :: Loop Control - Discussion

Home > C Programming > Loop Control > MCQs Questions Discussion

4 / 61

What is the output of the following C Program?

#include<stdio.h> void main()
{
int c[ ]={2.8,3.4,4,6.7,5};
int j,*p=c,*q=c; 
for(j=0;j<5;j++) {
printf(" %d ",*c);
++q;       
}
for(j=0;j<5;j++){
printf(" %d ",*p);
++p;       
}
}

A2 3 4 6 5 2 3 4 6 5

B2 2 2 2 2 2 3 4 6 5

C2.8 3.4 4 6.7 5 2.8 3.4 4 6.7 5

DNone of these

ECompiler Error

Answer: Option (Login/Signup)

Show Explanation

Asked In :: Societe Generale

Post Your Answer Here:     

No Discussion on this question yet!