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
Explain goto?
Write a program to replace n bits from the position p of the bit representation of an inputted character x with the one's complement. Method invertBit takes 3 parameters x as input character, p as position and n as the number of positions from p. Replace n bits from pth position in 8 bit character x. Then return the characters by inverting the bits.
What is a wrapper function in c?
How do you sort filenames in a directory?
Explain how can you tell whether two strings are the same?
Write a function that will take in a phone number and output all possible alphabetical combinations
What is #line used for?
Can true be a variable name in c?
Explain what is the use of a semicolon (;) at the end of every program statement?
write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.
7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.
List some of the static data structures in C?
Explain what does the format %10.2 mean when included in a printf statement?
What is the process to generate random numbers in c programming language?
What is pointer to pointer in c?