C Fundamentals MCQs

303 questionsC-ProgramPage 20 of 34

Practice free C Fundamentals multiple-choice questions with instant answer feedback and step-by-step solutions. Click an option to check yourself, reveal the full explanation, and work through all 303 questions — no login required.

Question 172easy
Which of the following is possible with any 2 operators in C?
Question 173easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    double b = 5 % 3 & 4 + 5 * 6;
    printf("%lf", b);
}
Question 174easy
What will be the output of the following C code? (Initial values: x= 7, y = 8)
#include <stdio.h>
void main()
{
    float x;
    int y;
    printf("enter two numbers \n");
    scanf("%f %f", &x, &y);
    printf("%f, %d", x, y);
}
Advertisement
Question 175easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    int x = 4, y, z;
    y = --x;
    z = x--;
    printf("%d%d%d", x, y, z);
}
Question 176easy
Which of the following is not a valid variable name declaration?
Question 177easy
Comment on the behaviour of the following C code?
#include <stdio.h>
int main()
{
    int i = 2;
    i = i++ + i;
    printf("%d\n", i);
}
Advertisement
Question 178easy
What will be the output of the following C code?
#include<stdio.h>
enum colour
{
    blue, red, yellow
};
main()
{
    enum colour c;
    c=yellow;
    printf("%d",c);
}
Question 179easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    int k = 8;
    int x = 0 == 1 && k++;
    printf("%d%d\n", x, k);
}
Question 180easy
Which of the following is not a pointer declaration?