ExamVeda
Login
Home
51
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    int i = 2;
    do
    {
        printf("Hi");
    } while (i < 2)
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
52
The C code 'for(;;)' represents an infinite loop. It can be terminated by . . . . . . . .
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
53
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int i = 0;
    for (i++; i == 1; i = 2)
        printf("In for loop ");
        printf("After loop\n");
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
54
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    int x = 5;
    if (x < 1)
        printf("hello");
    if (x == 5)
        printf("hi");
    else
        printf("no");
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
55
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");
        }
    }
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board