21.
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    float x = 0.1;
    printf("%d, ", x);
    printf("%f", x);
}

24.
Comment on the output of the following C code.
#include <stdio.h>
int main()
{
    int i, n, a = 4;
    scanf("%d", &n);
    for (i = 0; i < n; i++)
        a = a * 2;
}

25.
What will be the final values of i and j in the following C code?
#include <stdio.h>
int x = 0;
int f()
{
    if (x == 0)
        return x + 1;
    else
        return x - 1;
}
int g()
{
    return x++;
}
int main()
{
    int i = (f() + g()) || g();
    int j = g() || (f() + g());
}

26.
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int x = 2, y = 0;
    int z = (y++) ? 2 : y == 1 && x;
    printf("%d\n", z);
    return 0;
}

29.
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int x = 3; //, y = 2;
    const int *p = &x;
    *p++;
    printf("%d\n", *p);
}

Read More Section(C Fundamentals)

Each Section contains maximum 100 MCQs question on C Fundamentals. To get more questions visit other sections.