ProgrammingEasyHCL · Tech Mahindra pattern
A line such as #include <stdio.h> is processed by:
- A. The preprocessor, before compilation proper
- B. The loader at run time
- C. The linker
- D. The assembler
Correct answer: A. The preprocessor, before compilation proper
Lines starting with # are preprocessor directives. #include pastes the header's text into the file before the compiler sees it; the linker later resolves the library functions themselves.
More C Programming questions
- Which printf format specifier is meant for printing a pointer value (an address)?
- What is printed? c printf("%d", 10 / 3 3);
- What is printed? c int a = 5, b; b = a++ + 10; printf("%d %d", a, b);
- What is printed? c char s[] = "placement"; printf("%zu %zu", sizeof(s), strlen(s));
- What is printed? c int arr[] = {10, 20, 30, 40}; int p = arr; p += 2; printf("%d", p);
- What does f(4096) return? c int f(int n) { if (n == 0) return 0; return n % 10 + f(n / 10); }