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


Please Help Members By Posting Answers For Below Questions

What are the back slash character constants or escape sequence charactersavailable in c?

680


What are header files? What are their uses?

634


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.

1589


Write a program to swap two numbers without using the third variable?

591


What are the disadvantages of a shell structure?

686






Why do we use null pointer?

601


What is difference between structure and union in c programming?

565


what is the format specifier for printing a pointer value?

609


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

1587


Why is %d used in c?

559


Where can I get an ansi-compatible lint?

634


FILE PROGRAMMING

1775


what is event driven software and what is procedural driven software?

2006


What is a stream?

642


How many keywords are there in c?

586