Which is not valid in C?
1) class aClass{public:int x;}
2) /* A comment */
3) char x=12;
Answers were Sorted based on User's Feedback
Answer / sridhar
1)is valid in case of objective C
2)thts a valid comment
3)its invalid
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / sriharsha
I think char x=12 is also not valid
Because 1.maximum length of the character can be 1 character
2.It should enclosed within single inverted commas, like
'1',or 'a'.
Is This Answer Correct ? | 2 Yes | 2 No |
Answer / sourisengupta
1) class aClass{public:int x;}
3) char x=12;
these twoo are not valid in c.
Is This Answer Correct ? | 1 Yes | 1 No |
Write a C program to check a number even or odd, without using any relational, arithmetic operator and any loops.
How would you obtain the current time and difference between two times?
Do variables need to be initialized?
Can you write a programmer for FACTORIAL using recursion?
write a programe returns the number of times the character appears in the string
#define d 10+10 main() { printf("%d",d*d); }
wat is the difference between a definition and declaration? float y;---it looks like a declaration..but it s a definition.how?someone explain
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].
int a=0,b=2; if (a=0) b=0; else b=*10; What is the value of b ?
What are pointers in C?
What is external and internal variables What is dynamic memory allocation what is storage classes in C
i have a written test for microland please give me test pattern