C programming test questions and answers
This C programming online test or quiz will help you to clear online certification exams and will prepare you for the interviews. You will get multiple-choice questions (MCQs) based on c programming, where you will be given 4-5 options. You have to select the right answer for the questions. You can check your quiz summary and get your online test score after finishing the online test.
Quiz-summary
0 of 15 questions completed
Questions:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
Information
Learn and practice Online C Programming questions and improve your skills for your next interview.
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading...
You must sign in or sign up to start the quiz.
You have to finish following quiz, to start this quiz:
Results
0 of 15 questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 points, (0)
Average score |
|
Your score |
|
Categories
- Not categorized 0%
Pos. | Name | Entered on | Points | Result |
---|---|---|---|---|
Table is loading | ||||
No data available | ||||
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- Answered
- Review
-
Question 1 of 15
1. Question
What will be printed after execution of the following code?
void main()
{
int arr[10] = {1,2,3,4,5};
printf("%d", arr[5]);
}Correct
Incorrect
-
Question 2 of 15
2. Question
What is the output of this C code?
void m()
{
printf("Welcome to Aviance School");
}
void main()
{
m();
}Correct
Incorrect
-
Question 3 of 15
3. Question
What will be the output of following program ?
#include
int main()
{
int a=10;
int b=2;
int c;
c=(a & b);
printf("c= %d",c);
return 0;
}Correct
Incorrect
-
Question 4 of 15
4. Question
Which of the following are unary operators in C?
1. !
2. sizeof
3. ~
4. &&Correct
Incorrect
-
Question 5 of 15
5. Question
What will be the output of following program ?
public class temp
{
public static void main(String args[])
{
int ok=10;
switch(ok)
{
default:
System.out.println("default");
case 0:
System.out.println("true");
case 1:
System.out.println("false");
}
}
}Correct
Incorrect
-
Question 6 of 15
6. Question
Smallest element of an array is called as _______.
Correct
Incorrect
-
Question 7 of 15
7. Question
The output of the following program ?
#include
int main()
{
int n1 = 20;
float n2 = 20.0;
if(n1 == n2)
printf("n1 and n2 are equal");
else
printf("n1 and n2 are not equal");
return 0;
}Correct
Incorrect
-
Question 8 of 15
8. Question
Array with last element ‘n’ will always have array size equal to _______.
Correct
Incorrect
-
Question 9 of 15
9. Question
To print a double value which format specifier can be used?
Correct
Incorrect
-
Question 10 of 15
10. Question
What will be the output of following program ?
#include
void main()
{
char a=1;
if(a--==0)
printf("True");
else
printf("False");
}Correct
Incorrect
-
Question 11 of 15
11. Question
What will be the output of following program ?
#include
#define TRUE 1
int main()
{
switch(TRUE)
{
printf("How are you?");
}
}
Correct
Incorrect
-
Question 12 of 15
12. Question
What is the output of the following program?
#include
void main()
{
int i=0;
while(+(+i--)!=0)
i-=i++;
printf("%d",i);
}Correct
Incorrect
-
Question 13 of 15
13. Question
The format identifier ‘%i’ is used for _____ data type?
Correct
Incorrect
-
Question 14 of 15
14. Question
The size of an int data type is?
Correct
Incorrect
-
Question 15 of 15
15. Question
Output of the C code is?
int main()
{
float num = 0.5;
if (num == 0.5f)
printf("Equal\n");
else
printf("Not Equal\n");
}Correct
Incorrect
Related Search:
C Programming Test Questions And Answers
Free Online C Programming Test
C Programming Quiz
C Online Quiz
Free C Programming Online Quiz
Online C Programming Practice
C Programming Exam Questions And Answers
Online C Programming Practice