C Programming MCQs 2025 (Questions with Answers)

LT Grade Computer Teacher 2025 C Programming 50 MCQ

C Programming MCQs 2025 (Questions with Answers)

This is the best C Programming MCQs with answers for the LT Grade Computer Teacher exam 2025. The collection of C language multiple-choice questions is designed to cover all important topics like variables, data types, operators, control statements, arrays, strings, pointers, functions, structures, and file handling. Practicing these objective type C programming questions helps in quick revision and improves accuracy for all competitive exams. These C programming practice questions are ideal for LT Grade preparation, teaching exams, and computer science interviews. Start solving C programming MCQ questions with answers today and strengthen your fundamentals for exam success.


C Programming MCQs for LT Grade Computer Teacher Exam 2025

Basics of C

  1. C language was developed by?
    a) Dennis Ritchie
    b) Ken Thompson
    c) James Gosling
    d) Charles Babbage
    Answer: a) Dennis Ritchie
  2. C language was developed at?
    a) Bell Labs
    b) Microsoft
    c) Sun Microsystems
    d) IBM
    Answer: a) Bell Labs
  3. Which year was C developed?
    a) 1970
    b) 1972
    c) 1979
    d) 1983
    Answer: b) 1972
  4. C language is a:
    a) High level language
    b) Low level language
    c) Middle level language
    d) Machine language
    Answer: c) Middle level language
  5. Which of the following is the file extension of C program files?
    a) .cpp
    b) .c
    c) .java
    d) .py
    Answer: b) .c

Data Types & Operators

  1. Size of int on a 32-bit system is:
    a) 2 bytes
    b) 4 bytes
    c) 8 bytes
    d) Depends on compiler
    Answer: b) 4 bytes
  2. The default return type of a function in C is:
    a) void
    b) int
    c) float
    d) double
    Answer: b) int
  3. Which of the following is NOT a valid data type in C?
    a) int
    b) float
    c) real
    d) char
    Answer: c) real
  4. Which operator is used to access the value at an address?
    a) &
    b) *
    c) ->
    d) .
    Answer: b) *
  5. The modulus operator (%) can be applied to:
    a) int only
    b) float only
    c) int and float both
    d) char only
    Answer: a) int only

Control Statements

  1. Which keyword is used for decision making?
    a) loop
    b) switch
    c) case
    d) if
    Answer: d) if
  2. Which loop is guaranteed to execute at least once?
    a) for
    b) while
    c) do-while
    d) nested for
    Answer: c) do-while
  3. The break statement is used for:
    a) Exit from loop
    b) Continue next iteration
    c) End program
    d) None
    Answer: a) Exit from loop
  4. Which keyword transfers control to the beginning of the loop?
    a) break
    b) continue
    c) goto
    d) return
    Answer: b) continue
  5. Switch-case works with:
    a) float
    b) double
    c) int & char
    d) string
    Answer: c) int & char

Functions & Storage Classes

  1. Functions in C are by default:
    a) inline
    b) global
    c) extern
    d) static
    Answer: c) extern
  2. Which keyword is used to define a function?
    a) define
    b) func
    c) void / return type
    d) function
    Answer: c) void / return type
  3. Static variables are stored in:
    a) Heap
    b) Stack
    c) Data segment
    d) CPU register
    Answer: c) Data segment
  4. Which storage class has default value 0?
    a) auto
    b) static
    c) register
    d) extern
    Answer: b) static
  5. Recursion in C means:
    a) Function calling itself
    b) Loop inside function
    c) Function calling another function
    d) None
    Answer: a) Function calling itself

Pointers & Arrays

  1. Pointer in C is used to store:
    a) Value of variable
    b) Address of variable
    c) Both
    d) None
    Answer: b) Address of variable
  2. Which symbol is used to declare a pointer?
    a) &
    b) *
    c) ->
    d) %
    Answer: b) *
  3. An array index in C starts from:
    a) -1
    b) 0
    c) 1
    d) Depends on compiler
    Answer: b) 0
  4. Which of these is a correct declaration?
    a) int arr[];
    b) int arr[10];
    c) int arr(10);
    d) array int[10];
    Answer: b) int arr[10];
  5. A 2D array int a[3][4]; has how many elements?
    a) 7
    b) 12
    c) 24
    d) 36
    Answer: b) 12

Strings & Memory

  1. Strings in C are terminated with:
    a) ;
    b) \n
    c) \0
    d) null pointer
    Answer: c) \0
  2. Which header file is required for string functions?
    a) stdio.h
    b) string.h
    c) conio.h
    d) stdlib.h
    Answer: b) string.h
  3. strlen("Hello") returns:
    a) 4
    b) 5
    c) 6
    d) 7
    Answer: b) 5
  4. Which function is used to allocate memory dynamically?
    a) malloc()
    b) calloc()
    c) realloc()
    d) free()
    Answer: a) malloc()
  5. Which function is used to release memory?
    a) delete()
    b) remove()
    c) free()
    d) dispose()
    Answer: c) free()

Input/Output

  1. Which function is used to print output in C?
    a) cout
    b) print
    c) printf
    d) display
    Answer: c) printf
  2. Which function is used to take input in C?
    a) cin
    b) input
    c) scanf
    d) read
    Answer: c) scanf
  3. Format specifier for float is:
    a) %d
    b) %c
    c) %f
    d) %lf
    Answer: c) %f
  4. Format specifier for double is:
    a) %f
    b) %lf
    c) %d
    d) %Ld
    Answer: b) %lf
  5. Format specifier for unsigned int is:
    a) %u
    b) %d
    c) %lu
    d) %ld
    Answer: a) %u

Preprocessor & Files

  1. Header files in C have extension:
    a) .cpp
    b) .h
    c) .hpp
    d) .hdr
    Answer: b) .h
  2. Preprocessor directives start with:
    a) $
    b) #
    c) %
    d) @
    Answer: b) #
  3. Macro in C is defined using:
    a) #define
    b) #macro
    c) #include
    d) #func
    Answer: a) #define
  4. Which function is used to open a file?
    a) open()
    b) fopen()
    c) fileopen()
    d) newfile()
    Answer: b) fopen()
  5. Which mode is used to append data in a file?
    a) w
    b) r
    c) a
    d) x
    Answer: c) a

Advanced

  1. sizeof(char) is always:
    a) 1
    b) 2
    c) 4
    d) Depends on OS
    Answer: a) 1
  2. Which of the following is not a loop in C?
    a) for
    b) while
    c) foreach
    d) do-while
    Answer: c) foreach
  3. The keyword used to exit from a function is:
    a) exit
    b) break
    c) return
    d) stop
    Answer: c) return
  4. Which operator has the highest precedence?
    a) +
    b) =
    c) ()
    d) &&
    Answer: c) ()
  5. Which of the following is a logical operator?
    a) &&
    b) ||
    c) !
    d) All of these
    Answer: d) All of these
  6. Null pointer in C is represented as:
    a) 0
    b) NULL
    c) (void*)0
    d) All of these
    Answer: d) All of these
  7. A function that calls itself is called:
    a) Recursive
    b) Inline
    c) Static
    d) Global
    Answer: a) Recursive
  8. Which keyword is used to include library files?
    a) import
    b) include
    c) #include
    d) library
    Answer: c) #include
  9. Which operator is used to access structure members?
    a) .
    b) ->
    c) *
    d) &
    Answer: a) .
  10. To access members of a structure through pointer, we use:
    a) .
    b) ->
    c) *
    d) &
    Answer: b) ->