You are not logged in.

#1 2015-09-15 05:58:53

hasnain
Administrator
From: Chichawatni
Registered: 2014-10-13
Posts: 8,355
Website

Syntax Error:

http://interviewquestionsanswers.org/quiz/C-Programming http://interviewquestionsanswers.org/qu … Structures

Directions:
Consider the following code:
void main()
{
   int a[5] = {6,8,3,9,0}, i=0;
   if(i != 0)
   {
      break;
      printf("%d", a[ i ]);
   }
   else
      printf("%d", a[i++]);
}

Question:
What is the output of the above program?

Option A):
No output
Option B):
Runtime error
Option C):
8
Option D):
Syntax error

Correct Answer is Option D):
Syntax error


Failure is the first step towards seccess.

2015-09-15 05:58:53

Advertisement
Ads By Google

Re: Syntax Error:



Board footer