Which is not valid in C?
1) class aClass{public:int x;}
2) /* A comment */
3) char x=12;
Answer Posted / 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 |
Post New Answer View All Answers
What are the back slash character constants or escape sequence charactersavailable in c?
What are header files? What are their uses?
Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.
Write a program to swap two numbers without using the third variable?
What are the disadvantages of a shell structure?
Why do we use null pointer?
What is difference between structure and union in c programming?
what is the format specifier for printing a pointer value?
If i have an array 0 to 99 i.e,(Size 100) I place the values 1 to 100 randomly like a[0]=29,a[1]=56 upto array[99].. the values are only between 1 to 100. getting the array values by using scanf.. If i entered one wrong element value line a[56]=108. how can i find it.. and also how to find the missing value in 1 to 100.. and i want to replace the missing values.. any one of them know please post your answer..
Why is %d used in c?
Where can I get an ansi-compatible lint?
FILE PROGRAMMING
what is event driven software and what is procedural driven software?
What is a stream?
How many keywords are there in c?