CSE MCQs :: C-MCQs
- Which keyword can be used for coming out of recursion?
-
What is the output of this C code?
int main()
{
int a = 0, i = 0, b;
for (i = 0;i < 5; i++)
{
a++;
continue;
}
}
-
What is the output of this C code?
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 is the output of this C code?
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 is the output of this C code?
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 is the output of this C code?
void main()
{
int i = 0;
for (i = 0;i < 5; i++)
if (i < 4)
{
printf("Hello");
break;
}
}
-
What is the output of this C code?
void main()
{
int i = 0;
if (i == 0)
{
printf("Hello");
continue;
}
}
-
What is the output of this C code?
void main()
{
int i = 0;
if (i == 0)
{
printf("Hello");
break;
}
}