?
Consider the following code:
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++]);
}
What is the output of the above program?
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++]);
}
Answer & Solution
Correct Answer:
Option
D
break can't be used with selection control structures, but can used with repetitive(for, while), or select control structure(switch).
Join the Discussion
Login to post a comment or share your explanation.
Login