Govt. Exams
Entrance Exams
In C, an identifier cannot start with a digit. It must start with a letter (a-z, A-Z) or underscore (_). Option B violates this rule by starting with a digit.
Both syntaxes are valid in C. Option A explicitly specifies both dimensions, while Option B lets the compiler calculate the first dimension based on initialization.
sizeof(int) returns the size of integer in bytes as an integer value. On most modern systems, this is 4 bytes, and printf with %d will print this numeric value.
The correct syntax for declaring a pointer to an integer is 'int *ptr;' where the asterisk (*) indicates it is a pointer variable.
The stdio.h header file contains declarations for standard input/output functions like printf(). Option A is C++, Option C is C++, and Option D is for memory allocation functions.
The == operator compares values. Since a and b both have value 5, the condition is true and "Equal" is printed.
getchar() reads a single character from standard input (stdin) and returns its ASCII value.
Integer division truncates the decimal part. 5/2 = 2 (not 2.5) because both operands are integers.
Both syntaxes are correct. C allows initializing 2D arrays with or without explicit braces for each row.
The #define directive replaces MAX with 10 during preprocessing. So x = 10 and output is 10. (Note: semicolon after MAX is not needed but doesn't affect the output)