Vidyalelo
C Programming · all questions

C Fundamentals
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

303

Questions

16/16

Page

Pick an option on a question to see the right answer and solution.

What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int i = 3;
    int l = i / -2;
    int k = i % -2;
    printf("%d %d\n", l, k);
    return 0;
}

Select an option to see the answer and solution.

What will happen if the following C code is executed?
#include <stdio.h>
int main()
{
    int main = 3;
    printf("%d", main);
    return 0;
}

Select an option to see the answer and solution.

What will be the output of the following C code?
#include<stdio.h>
#define MAX 4
enum Shyam
{
    a,b=3,c
};
main()
{
    if(MAX!=c)
        printtf("hello");
    else
        printf("welcome");
}

Select an option to see the answer and solution.