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

which one is better structure or union?(other than the space occupied )

2 Answers  


Why the use of alloca() is discouraged?

2 Answers   Oracle,


how can use subset in c program and give more example

0 Answers  


What is the difference between new and malloc functions?

0 Answers   InterGraph,


write a program for even numbers?

19 Answers   TCS,






what are the difference between ANSI C and Let Us c and Turbo C

4 Answers   LG Soft,


why you will give me a job in TCS.

7 Answers   TCS,


On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area

0 Answers  


what is the Output? int a=4 b=3; printf("%d%d%d%d%d%d",a++,++a,a++,a++,++a,a++); printf("%d%d%d%d%d%d",b--,b--,--b,b--,--b,--b);

10 Answers   IBM,


which types of data structure will i use to convert infix to post fix???

5 Answers   IIT,


diff. between *p and **p

3 Answers  


int a[3][5]={ {1,2,3,4,5],{2,3,4,5,6},{10,11,12,13,14}}; int *p=&a; printf(ā€œ%dā€,*(*(x+1)+3));

2 Answers   Wipro,


Categories