What will be the output of the following C code?
#include <stdio.h>
int main()
{
int a = 0, i = 0, b;
for (i = 0;i < 5; i++)
{
a++;
continue;
}
}
The keyword ‘break’ cannot be simply used within _________
1 Crore+ students have signed up on EduRev. Have you? Download the App |
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int i = 0, j = 0;
for (i = 0;i < 5; i++)
{
for (j = 0;j < 4; j++)
{
if (i > 1)
break;
}
printf("Hi \n");
}
}
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int i = 0;
for (i = 0;i < 5; i++)
if (i < 4)
{
printf("Hello");
break;
}
}
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int i = 0;
if (i == 0)
{
printf("Hello");
break;
}
}
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int i = 0, j = 0;
for (i; i < 2; i++){
for (j = 0; j < 3; j++)
{
printf("1\n");
break;
}
printf("2\n");
}
printf("after loop\n");
}
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int i = 0;
char c = 'a';
while (i < 2)
{
i++;
switch (c)
{
case 'a':
printf("%c ", c);
break;
break;
}
}
printf("after loop\n");
}
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int a = 0, i = 0, b;
for (i = 0;i < 5; i++)
{
a++;
if (i == 3)
break;
}
}
Which keyword is used to come out of a loop only for that iteration?
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int i = 0;
int j = 0;
for (i = 0;i < 5; i++)
{
for (j = 0;j < 4; j++)
{
if (i > 1)
continue;
printf("Hi \n");
}
}
}
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int i = 0;
if (i == 0)
{
printf("Hello");
continue;
}
}
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int i = 0;
do
{
i++;
if (i == 2)
continue;
printf("In while loop ");
} while (i < 2);
printf("%d\n", i);
}
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int i = 0;
while (i < 2)
{
if (i == 1)
break;
i++;
if (i == 1)
continue;
printf("In while loop\n");
}
printf("After loop\n");
}
What will be the output of the following C code?
#include <stdio.h>
int main()
{
printf("before continue ");
continue;
printf("after continue\n");
}