Online Examination System for all learner!!! coming soon..

C Programming Online Test 1

Following quiz provides Multiple Choice Questions (MCQs) related to C Programming Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Q.1 - What is the output of the following program?

#include
main()
{
register int x = 5;
int *p;
p=&x;
x++;
printf("%d",*p);
}
A - Compile error
B - 5
C - 6
D - Garbage value




Q.2 - What is the output of the following program?

#include
main()
{
int i = 1;
while(i++<=5);
printf("%d ",i++);
}
A - 4
B - 6
C - 2 6
D - 2 4




Q.3 - Special symbol permitted with in the identifier name.

A - $
B - @
C - _
D - .




Q.4 - What is the output of the following program?

#include
main()
{
char *p = NULL;
printf("%c", *p);
}
A - NULL
B - 0
C - Compile Error
D - Runtime error.




Q.5 - What is the output of the following program?

#include
main()
{
#undef NULL
char *s = "Hello";
while(*s != NULL)
{
printf("%c", *s++);
}
}
A - HELLO
B - Compile error: there is no macro called “undef”
C - Compile error: improper place of #undef
D - Compile error: NULL is undeclared.



Q.6 - In C, what are the various types of real data type (floating point data type)?

A - Float, long double
B - long double, short int
C - float, double, long double
D - short int, double, long int, float




Q.7 - Which of the following is a logical OR operator?

A - &
B - &&
C - ||
D - None of the above




Q.8 - Which of the following variable cannot be used by switch-case statement?

A - char
B - int
C - float
D - double




Q.9 - The correct order of evaluation for the expression “z = x + y * z / 4 % 2 – 1”

A - * / % = + -
B - / * % - + =
C - - + = * % /
D - * / % + - =




Q.10 - Choose the function that is most appropriate for reading in a multi-word string?

A - strnset()
B - scanf()
C - strchr()
D - gets()



Tag: c, c programming test questions and answers, c programming exam questions and answers pdf, c online quiz, online c programming practice, c programming online test tutorialspoint, embedded c online test, online c programming test with certificate, c test, c programming online test with answers, c programming test questions and answers, c programming exam questions and answers pdf, c online quiz, online c programming practice, psychometric testing program in c, c test for eye, c aptitude questions and answers with explanation.

C Programming Online Test 1

Following quiz provides Multiple Choice Questions (MCQs) related to C Programming Framework. You will have to read all the given answ...