Advertisements

Search results for goto

Example:[1]

            What is the output of the following c program?
#include <stdio.h>
void main()
{
	int i;
	for(i = 0;i < 8;i++)
	{
		if(i == 5)
		{
			goto out;
		}
	}
	out:
	printf("%d\n", i);
}
          
Option A:

            0
            
Option B:

            1
            
Option C:

            7
            
Option D:

            5
            
Correct Answer: option D

 Search Links


 Popular C search MCQs


 Popular C search examples