All Exams Test series for 1 year @ ₹349 only
Question

What are the statements that begin with # symbol called in C programming language?

This question was previously asked in
RRB JE 2025 CBT 2 Mechanical and Allied Engg Question Paper English (2-Jul-2026) (Shift-1)
The correct answer is

Preprocessor Directives

In the C programming language, compilation is not a single step. Before the compiler proper translates your source code into object code, a separate program called the C preprocessor scans the file and performs text-level transformations. Every line that begins with the # symbol is an instruction to this preprocessor and is therefore called a preprocessor directive.

The preprocessor runs first and handles tasks such as file inclusion, macro expansion, and conditional compilation, producing an expanded translation unit that is then passed to the actual compiler. Common directives include:

  • #include <stdio.h> — textually inserts the contents of a header file, giving access to declarations such as printf.
  • #define PI 3.14 — creates a macro; every later occurrence of PI is replaced by 3.14 before compilation.
  • #ifdef, #ifndef, #endif — conditional compilation, letting blocks of code be included or excluded based on defined symbols (widely used in header guards).
  • #pragma — passes special implementation-specific instructions to the compiler.

The other choices describe different language elements. Comments are written with // or /* ... */ and are ignored entirely rather than acted upon. Control statements such as if, for, and while direct the flow of execution at run time. Function declarations announce a function's name, return type, and parameters to the compiler. None of these begin with #, so preprocessor directives is the correct answer.

Was this answer helpful?

Similar Questions

  1. Consider the following code snippet in C programming language. 

    int n = 5; 

    int m = n++; 

    What is the value of m after execution?

  2. Which statement is TRUE about if statement in the C programming language?

  3. Which shape is used to represent a decision in a flowchart?

  4. You need to read a floating-point value from the user in the C programming language. Which of the following statements correctly performs this task?

  5. What is the output of the give C language code snippet? 

    void f(int x)

    {

     x = x + 5;

     }

     int main()

    { 

    int a = 10;

     f(a); 

    printf("%d",a); 

    return 0; 

    }


Important Questions from Programming in C

  1. In object-oriented programming, which keyword ensures that a member variable belongs to the class itself rather than to any specific object, thereby allowing all instances to share a single copy of that variable?

  2. The condition num! = 65 cannot be replaced by

  3. Which statement is false?

  4. The three basic structure types used to write the algorithm for a program are sequence, selection and repetition. Which of the following is NOT an advantage of using only these structures when writing the algorithm for a program?

  5. Consider the following recursive Java function f that takes two long arguments and returns a float value:

    public static float f (long m, long n) {

    float result = (float)m / (float)n;

    if(m < 0 | n < 0) return 0.of;

    else result - = f(m * 2,n * 3);

    return result ;

    }

    Which of the following real values best approximates the value of f (1, 3) ?

Need Expert Advice?
Test Series
RRB JE img
Railways
RRB JE (CBT 1 + CBT 2) 2026 Mock Test Series
1509 Tests 19 Tests Free
710 Attempts
4.4(121)
English, Hindi

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App