Congratulations - you have completed C Programming : Multiple Choice Questions.
You scored %%SCORE%% out of %%TOTAL%%.
Your performance has been rated as %%RATING%%
Your answers are highlighted below.
Question 1 |
Comments can be split over more than one line !!
False | |
True |
Question 2 |
Nested Comments are not allowed in C Programming !!
True | |
False |
Question 3 |
C Program can Contain Any number of Comments at Any Place !
True | |
False |
Question 4 |
Guess the output of the following code -
/* This is /*Print Hello */ */ printf("Hello");
Stack Overflow | |
Compile Error | |
Garbage Value | |
Hello |
Question 4 Explanation:
Nested Comments not allowed
Question 5 |
How many comments are present in following C program ?
void main(/*Main Function*/) { int sample_comment; // Variable printf("Enter the comment ID : "); scanf("%d",/*Type Age*/&sample_comment); printf("Comment is %d : ",/*Your comment here*/sample_comment); getch() }
3 | |
4 | |
3 | |
5 |
Question 5 Explanation:
1 Single Line and 3 Multiple Line Comments are present in the above c program
Question 6 |
C Programming comment is not used for any of the following purpose !!
Documentation Purpose | |
Specifying Author Information | |
Dynamic Memory Allocation | |
None of these |
Question 7 |
Following is the example of nested comment.
/* Hello World // Sample Nested Comment */Is it legal C Programming Comment ?
No | |
Yes |
Question 7 Explanation:
Nesting of Single Line Comment in Multiple Line Comment is allowed !!
Question 8 |
A Single C Program can have _______ Single Line and multiple line comments ?
None of these | |
1-10 | |
Depends on the Number of Lines | |
Any Number of Comment |
Question 9 |
Comments in C Program can be used for beautifying code !!
True | |
False |
Question 10 |
Good Comment can improve the readability of the code and can reduce the complexity while understanding the code written by another author !!
True | |
False |
Once you are finished, click the button below. Any items you have not completed will be marked incorrect.
There are 10 questions to complete.