Govt Exams
A 2D array with dimensions 3x4 has 3*4 = 12 total elements.
strcpy() copies the contents of the source string to the destination string.
Array names are constant pointers and cannot be reassigned. Direct assignment to char array after declaration is invalid.
strlen() returns the length of the string excluding the null terminator '\0'. "Hello" has 5 characters.
In C, arrays are declared with the syntax: datatype arrayname[size]. Option A follows the correct syntax.
A void function cannot return a value. Attempting to assign the return value of a void function to a variable will cause a compilation error in standard C compilers.
A declaration tells the compiler about the function's signature (return type, name, parameters); a definition provides the actual implementation (function body).
C does not have a 'ref' keyword like C++. Pointers are used to achieve pass-by-reference semantics in C by passing the address of a variable.
A static function has internal linkage and is limited to the file in which it is defined. It cannot be accessed from other translation units.
A function prototype must have the return type first, followed by the function name and parameter list in parentheses. Option A is the correct syntax.