C Programming MCQs with answers Page - 23

Here, you will find a collection of MCQ questions on C Programming. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 833.24K Points
Coach

Q. What is the output of the C Program?

Code:
int main()
{
    int a=0;
    a = 10 + 2 * 12 /(3*2) + 5;
    printf("%d", a);

    return 0;
}
  • (A) 31
  • (B) 19
  • (C) 11
  • (D) 29

A

Admin • 833.24K Points
Coach

Q. What is the output of the C Program?

Code:
int main()
{
    int a=0;
    a = 10 + 2 * 12 / 3 * 2 + 5;
    printf("%d", a);

    return 0;
}
  • (A) 19
  • (B) 31
  • (C) 11
  • (D) 25

A

Admin • 833.24K Points
Coach

Q. What is the output of the C Program?

Code:
int main()
{
    float a=10.0;
    a = a % 3;
    printf("%f", a);

    return 0;
}
  • (A) 0
  • (B) 1
  • (C) 1.000000
  • (D) Compiler error.

A

Admin • 833.24K Points
Coach

Q. What is the output of the C Program?

Code:
int main()
{
    int a=0;
    a = 14%-5 - 2;
    printf("%d", a);

    return 0;
}
  • (A) 0
  • (B) -4
  • (C) -2
  • (D) 2

A

Admin • 833.24K Points
Coach

Q. What is the output of the C Program?

Code:
int main()
{
    int a= 3 + 5/2;
    printf("%d", a);

    return 0;
}
  • (A) 3
  • (B) 2
  • (C) 5
  • (D) Can not assign an expression to variable at the time of declaration.

A

Admin • 833.24K Points
Coach

Q. Choose a C Conditional Operator from the list.

  • (A) ?:
  • (B) :?
  • (C) :<
  • (D) <:

A

Admin • 833.24K Points
Coach

Q. What is the other name for C Language ?: Question Mark Colon Operator.?

  • (A) Comparison Operator
  • (B) If-Else Operator
  • (C) Binary Operator
  • (D) Ternary Operator

A

Admin • 833.24K Points
Coach

Q. Choose a syntax for C Ternary Operator from the list.

  • (A) condition ? expression1 : expression2
  • (B) condition : expression1 ? expression2
  • (C) condition ? expression1 < expression2
  • (D) condition < expression1 ? expression2

A

Admin • 833.24K Points
Coach

Q. What is the output of the C statement.?

Code:
int main()
{
    int a=0;
    a = 5<2 ? 4 : 3;
    printf("%d",a);

    return 0;
}
  • (A) 4
  • (B) 3
  • (C) 5
  • (D) 2

A

Admin • 833.24K Points
Coach

Q. What is the output of C Program.?

Code:
int main()
{
    int a=0;
    a = printf("4");
    printf("%d",a);

    return 0;
}
  • (A) 04
  • (B) compiler error
  • (C) 40
  • (D) 41

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ