Which of the following about the C comments is incorrect ?
a.commentscan go over multiple lines
b.comments can start any where in the line
c.a line can contain comments with out any language statements
d.comments can occur within comments
Answers were Sorted based on User's Feedback
Answer / arpit dhandhania
Answer is d it is not possible to write nested comments in C
| Is This Answer Correct ? | 8 Yes | 1 No |
Answer / kushal
@above
your syntax is false,thats why u r getting an error,
if u write like this,
scanf("%d,%d", c /*dis are the values to be printed */ a,b);
then u will nt face any error
write ans shold be
<d>
| Is This Answer Correct ? | 4 Yes | 2 No |
Answer / shikhar
answer : c
Reason : a line cannot contain comments with out any
language statements since it will give an syntax error. i.e
"the code didn't recognize the unformatted text."
for example :
scanf("%d,%d", c //dis are the values to be printed // a,b);
Here, the comments inside scanf will not recognize the
comment n hence outputs an error.
| Is This Answer Correct ? | 2 Yes | 7 No |
Can a program have two main functions?
How can I rethow can I return a sequence of random numbers which dont repeat at all?
write a program to swap Two numbers without using temp variable.
75 Answers EMC, Focus, GreyB, HCL, Hitech, HP, Huawei, Infosys, Mannar Company, Microsoft, Miles Software, Odessa Technologies, Satyam, TCS, Wipro,
which of the following is not a character constant a) 'thank you' b) 'enter values of p, n ,r' c) '23.56E-o3' d) all of the above
what is the output of printf("%d",(scanf("%d",10));
What is nested structure in c?
how to count no of words,characters,lines in a paragraph.
If a variable is a pointer to a structure, then which operator is used to access data members of the structure through the pointer variable?
Which of the following operators is incorrect and why? ( >=, <=, <>, ==)
what does data structure mean?
to find out the reverse digit of a given number
6 Answers Infosys, Microsoft, TCS, Wipro,
how to add numbers without using arithmetic operators.