PROGRAMMING AND PROBLEM SOLVING THROUGH ‘C’ LANGUAGE

1.1 The following is a program
Main()
{
int x = 0;
while(x<=10)
for( ; ; )
if( ++ x%10 = =0)
break;
printf(“x = %d”, x);
}
What will be the output of the above program?
A) Will print x = 10
B) Will give compilation error
C) Will give runtime error
D) Will print x = 20



Leave a Reply