Govt. Exams
Entrance Exams
The correct syntax is 'int *ptr;' where * indicates ptr is a pointer to int.
malloc() and other dynamic memory allocation functions are declared in <stdlib.h>.
%c format specifier prints the character representation of ASCII value 65, which is 'A'.
By C standard, sizeof(char) is always 1 byte, regardless of platform.
Identifiers cannot start with a digit. They must start with a letter (a-z, A-Z) or underscore.
The size of 'int' is implementation-defined and depends on the compiler and platform, though it is typically 4 bytes on 32-bit systems.
The escape sequence \n represents a newline character that moves the cursor to the next line.
The main() function implicitly returns int type, which indicates the program's exit status (0 for success, non-zero for failure).
Variable names in C must start with a letter or underscore, followed by alphanumeric characters or underscores. '_variable123' is valid, while '2variable' starts with digit, 'var-iable' has hyphen, and 'var iable' has space.
The 'char' data type in C occupies 1 byte of memory and can store a single character.