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

a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none

0 Answers  


how to display 2-D array elements in spiral

2 Answers  


Can U write a C-program to print the size of a data type without using the sizeof() operator? Explain how it works inside ?

3 Answers   HCL, TCS,


`write a program to display the recomended action depends on a color of trafic light using nested if statments

0 Answers  


What is the code for 3 questions and answer check in VisualBasic.Net?

0 Answers   Infosys,






Why doesnt the call scanf work?

0 Answers  


What are the loops in c?

0 Answers  


How can I return multiple values from a function?

6 Answers  


how to swap 4 number without using temporary number?

2 Answers  


Explain can static variables be declared in a header file?

0 Answers  


What is the difference between int and float?

3 Answers  


main() { int x=5; printf("%d %d %d\n",x,x<<2,x>>2); } what is the output?

9 Answers   Ramco,


Categories