C Fundamentals MCQs

303 questionsC-ProgramPage 22 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 190easy
Where in C the order of precedence of operators do not exist?
Question 191easy
We want to create an alias name for an identifier of the type unsigned long. The alias name is: ul. The correct way to do this using the keyword typedef is . . . . . . . .
Question 192easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    int h = 8;
    int b = 4 * 6 + 3 * 4 < 3 ? 4 : 3;
    printf("%d\n", b);
}
Advertisement
Question 193easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    int x = 0;
    if (x = 0)
        printf("Its zero\n");
    else
        printf("Its not zero\n");
}
Question 194easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    int x = 4;
    int *p = &x
    int *k = p++;
    int r = p - k;
    printf("%d", r);
}
Question 195easy
Which data type is most suitable for storing a number 65000 in a 32-bit system?
Advertisement
Question 196easy
What will be the output of the following C code? (If the name entered is: Shyam)
#include<stdio.h>
#include<string.h>
typedef struct employee
{
    char  name[50];
    int   salary;
} e1;
void main( )
{
    printf("Enter Employee name");
    scanf("%s",e1.name);
    printf("\n%s",e1.name);
}
Question 197easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    int x = 4;
    int *p = &x
    int *k = p++;
    int r = p - k;
    printf("%d", r);
}
Question 198easy
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int a = -1, b = 4, c = 1, d;
    d = ++a && ++b || ++c;
    printf("%d, %d, %d, %d\n", a, b, c, d);
    return 0;
}