ExamVeda
Login
Home
71
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);
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
72
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    int k;
    for (k = -3; k < -5; k++)
        printf("Hello");
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
73
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int x = 0;
    if (x == 1)
        if (x >= 0)
            printf("true\n");
        else
            printf("false\n");
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
74
What will be the output of the following C code? (Assuming that we have entered the value 1 in the standard input)
#include <stdio.h>
void main()
{
    int ch;
    printf("enter a value between 1 to 2:");
    scanf("%d", &ch);
    switch (ch, ch + 1)
    {
       case 1:
          printf("1\n");
          break;
       case 2:
          printf("2");
          break;
    }
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
75
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    double k = 0;
    for (k = 0.0; k < 3.0; k++)
        printf("Hello");
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
76
How many times i value is checked in the following C code?
#include <stdio.h>
int main()
{
    int i = 0;
    while (i < 3)
        i++;
    printf("In while loop\n");
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
77
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int i = 0;
    do {
        i++;
        printf("In while loop\n");
    } while (i < 3);
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
78
How many times i value is checked in the following C code?
#include <stdio.h>
int main()
{
    int i = 0;
    do {
        i++;
        printf("in while loop\n");
    } while (i < 3);
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
79
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int x = 1;
    if (x > 0)
        printf("inside if\n");
    else if (x > 0)
        printf("inside elseif\n");
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
80
What will be the output of the following C code? (Assuming that we have entered the value 1 in the standard input)
#include <stdio.h>
void main()
{
    int ch;
    printf("enter a value between 1 to 2:");
    scanf("%d", &ch);
    switch (ch)
    {
       case 1:
          printf("1\n");
       default:
          printf("2\n");
    }
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board