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



Which is not valid in C? 1) class aClass{public:int x;} 2) /* A comment */ ..

Answer / k.kavitha

class aClass{public:int x;}

Is This Answer Correct ?    11 Yes 0 No

Which is not valid in C? 1) class aClass{public:int x;} 2) /* A comment */ ..

Answer / deepthi

1) class aclass{public:int x;}

Is This Answer Correct ?    10 Yes 0 No

Which is not valid in C? 1) class aClass{public:int x;} 2) /* A comment */ ..

Answer / bhavesh kashikar

1) class aClass{public:int x;}

Is This Answer Correct ?    4 Yes 0 No

Which is not valid in C? 1) class aClass{public:int x;} 2) /* A comment */ ..

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

Which is not valid in C? 1) class aClass{public:int x;} 2) /* A comment */ ..

Answer / chandrashekhar

1) Is invalid
3)is also invalid

Is This Answer Correct ?    1 Yes 0 No

Which is not valid in C? 1) class aClass{public:int x;} 2) /* A comment */ ..

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

Which is not valid in C? 1) class aClass{public:int x;} 2) /* A comment */ ..

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

Post New Answer

More C Interview Questions

Write a C program to check a number even or odd, without using any relational, arithmetic operator and any loops.

1 Answers  


How would you obtain the current time and difference between two times?

0 Answers   TISL,


Do variables need to be initialized?

0 Answers  


Can you write a programmer for FACTORIAL using recursion?

0 Answers   ADP,


write a programe returns the number of times the character appears in the string

2 Answers  


#define d 10+10 main() { printf("%d",d*d); }

6 Answers  


wat is the difference between a definition and declaration? float y;---it looks like a declaration..but it s a definition.how?someone explain

3 Answers   TCS,


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 ].

0 Answers  


int a=0,b=2; if (a=0) b=0; else b=*10; What is the value of b ?

6 Answers   TCS,


What are pointers in C?

5 Answers   KPIT,


What is external and internal variables What is dynamic memory allocation what is storage classes in C

3 Answers  


i have a written test for microland please give me test pattern

0 Answers   Microland,


Categories