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 program that explain #define and # undef directive

1 Answers  


can we store values and addresses in the same array? explain

3 Answers   TCS,


implement OR gate without using any bitwise operator.

1 Answers   Alcatel, Wipro,


WHAT IS RTGS N MINIMUM AMT TO B TRANSFERD N WHAT R THE CHARGES ON MINIMUM AMT N IN WHICH BANK WE CAN DO IT?

1 Answers  


printf("%d",(printf("Hello")); What it returns?

32 Answers   TCS,






find the sum of two matrices and WAP for it.

0 Answers   Huawei,


How can I split up a string into whitespace-separated fields?

0 Answers  


You have an array of n integers, randomly ordered with value 1 to n-1.The array is such that there is only one and one value occurred twice. How will you find this number?

1 Answers  


What are the types of macro formats?

0 Answers  


how to print 2-D array using a single for loop?

2 Answers   Mind Tree, TCS, Value Labs,


the expression a=30*1000+2768; evalutes to a) 32768 b) -32768 c) 113040 d) 0

1 Answers  


Hi Every one...........I have been selected for the SBI Clerk. But i m one month Pregnanat. So anyone please suggest me, is they take any objection on my joining .

4 Answers   State Bank Of India SBI,


Categories