Home / Programming Questions / C Programming MCQs / Page 1

C Programming MCQs with answers Page - 1

Dear candidates you will find MCQ questions of C Programming here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.
Share your questions by clicking Add Question

A

Akash Lawaniya • 9.48K Points
Tutor III

Q. What is the first stage of compilation of a C program?

(A) linking
(B) assembling
(C) preprocessing
(D) compiling

A

Akash Lawaniya • 9.48K Points
Tutor III

Q. What is a standard library function to read 1 char at a time?

(A) putchar()
(B) printf()
(C) getchar()
(D) write()

A

Akash Lawaniya • 9.48K Points
Tutor III

Q. What is the value of character constant 'A' of ASCII character set?

(A) 1
(B) 65
(C) 101
(D) 20

A

Akash Lawaniya • 9.48K Points
Tutor III

Q. Which of the following is the correct output for the program given below?

Code:
#include <studio.h>
int main ()
{
         int a = 40, b = 50, c = 10, x;
         x = a < b < c;
         printf("%d\n", x);
         return 0;
}
(A) 0
(B) 1
(C) Error
(D) None of the above

A

Akash Lawaniya • 9.48K Points
Tutor III

Q. What is the range of a signed char variable in C?

(A) 0 to 255
(B) -128 to 127
(C) 0 to 127
(D) -128 to 255

A

Akash Lawaniya • 9.48K Points
Tutor III

Q. Which of the following is the correct output for the program given below?

Code:
#include <stdio.h>
int main ( )
{
      float floatvalue = 8.25;
      printf ("%d\n " , (int) floatvalue);
      return 0;
}
(A) 0
(B) 0.0
(C) 8.0
(D) 8

A

Akash Lawaniya • 9.48K Points
Tutor III

Q. Which of the following is valid range of long double ?

(A) 3.4E-4932 to 1.1E+4932
(B) 3.4E-4932 to 3.4E+4932
(C) 1.1E-4932 to 1.1E+4932
(D) 1.7E - 308 to 1.7E + 308

A

Akash Lawaniya • 9.48K Points
Tutor III

Q. Which of the following is the correct datatype for the variable n in the statement given below? 
n = 35.29 ;

(A) float
(B) double
(C) long double
(D) Depends upon the memory model that you are using

Login

Forgot username? click here

Forgot password? Click here

Don't have account? Register here.