Wednesday , November 18 2026
Breaking News

C & C++ Programming Language Certification Exam Answers 2026 (All 100 Questions)

C & C++ Programming Language Certification exam answers 2026: This page lists all 100 questions of the official C & C++ Programming Language Certification exam by Itronix Solutions, each with its four answer options and the correct answer highlighted in green. Use it to revise every topic before you attempt the test and earn your verifiable certificate.

About this certification: C++ is a general-purpose programming language that was developed as an enhancement of the C language to include object-oriented paradigm.

Certification C & C++ Programming Language Certification
Provider Itronix Solutions
Category Programming & Development
Total questions 100 multiple-choice questions
Marks 1 mark per question (100 marks)
Passing score 80% (80 out of 100)
Retake Available if you do not pass
Certificate Verifiable online certificate

Take the exam: C & C++ Programming Language Certification on Itronix Solutions. See every other Itronix exam in our complete list of Itronix certification answers.

C & C++ Programming Language Exam Questions and Answers

Questions 1 to 25

1. What is C++?

A. C++ supports both procedural and object oriented programming language ✔
B. C++ is a functional programming language
C. C++ is an object oriented programming language
D. C++ is a procedural programming language

Correct answer: A. C++ supports both procedural and object oriented programming language

2. Which of the following is the correct syntax of including a user defined header files in C++?

A. #include <userdefined>
B. #include “userdefined” ✔
C. #include <userdefined>
D. #include [userdefined]

Correct answer: B. #include “userdefined”

3. Which of the following is used for comments in C++?

A. /* comment */
B. // comment */
C. // comment
D. both // comment or /* comment */ ✔

Correct answer: D. both // comment or /* comment */

4. Which of the following is the correct identifier?

A. VAR_123 ✔
B. varname@
C. $var_name
D. None of the above

Correct answer: A. VAR_123

5. Which of the following features must be supported by any programming language to become a pure object-oriented programming language?

A. Polymorphism
B. Encapsulation
C. Inheritance
D. All of the above ✔

Correct answer: D. All of the above

6. The programming language that has the ability to create new data types is called___.

A. Reprehensible
B. Extensible ✔
C. Overloaded
D. Encapsulated

Correct answer: B. Extensible

7. C++ language is a successor to which language?

A. VB
B. B
C. C ✔
D. Java

Correct answer: C. C

8. C++ follows ___.

A. Bottom-Up Design approach ✔
B. Top-Down Design approach
C. None of the above.
D. Both of the above

Correct answer: A. Bottom-Up Design approach

9. How many keywords are in C++?

A. 99
B. 95 ✔
C. 32
D. 48

Correct answer: B. 95

10. Which operator has highest precedence?

A. *
B. ++
C. () ✔
D. =

Correct answer: C. ()

11. Which operator has highest precedence in * / % ?

A. %
B. *
C. /
D. all have same precedence ✔

Correct answer: D. all have same precedence

12. How to access and edit data in data file handling using structures

A. write()
B. read()
C. without read()
D. both A and B ✔

Correct answer: D. both A and B

13. If the class name is X, what is the type of its “this” pointer (in a nonstatic, non-const member function)?

A. X& ✔
B. const X* const
C. X* const
D. X*

Correct answer: A. X&

14. Which classes allow primitive types to be accessed as objects?

A. Storage
B. Virtual ✔
C. Friend
D. Wrapper

Correct answer: B. Virtual

15. When is std::bad_alloc exception thrown?

A. When new operator cannot allocate memory
B. When type requested for new operation is considered bad, thisexception is thrown
C. When delete operator cannot delete the allocated (corrupted) object ✔
D. When alloc function fails

Correct answer: C. When delete operator cannot delete the allocated (corrupted) object

16. What happens if the following program is executed in C and C++? #include void func(void) { printf("Hello"); } void main() { func(); func(2); }

A. Outputs Hello twice in both C and C++
B. Error in both C and C++ ✔
C. Error in C++ and successful execution in C
D. Error in C and successful execution in C++

Correct answer: B. Error in both C and C++

17. Which of the following correctly declares an array in C++?

A. array array[10];
B. array{10};
C. int array[10]; ✔
D. int array;

Correct answer: C. int array[10];

18. Which is more effective while calling the C++ functions?

A. call by object
B. call by value
C. call by reference ✔
D. call by pointer

Correct answer: C. call by reference

19. Which of the following is the correct definition of sorting?

A. Sorting information or data only in increasing order
B. Sorting information or data only in decreasing order
C. Sorting is a type of process in which data elements are modified or manipulated
D. Sorting is a type of process in which the data or information is ordered into a specific order. Example increasing orders, decreasing. ✔

Correct answer: D. Sorting is a type of process in which the data or information is ordered into a specific order. Example increasing orders, decreasing.

20. Which one of the following statements correctly refers to the Delete and Delete[] in C++ programming language?

A. The "Delete" is a type of keyword, whereas the "Delete[]" is a type of identifier
B. The "Delete" is used for deleting a single standard object, whereas the "Delete[]" is used for deleting an array of the multiple objects ✔
C. The "Delete" is used for deleting the standard objects, while on the other hand, the "Delete[]" is used to delete the pointer objects
D. Delete is syntactically correct although, if the Delete[] is used, it will obtain an error.

Correct answer: B. The "Delete" is used for deleting a single standard object, whereas the "Delete[]" is used for deleting an array of the multiple objects

21. C was developed by:

A. James Gosling
B. Dennis Ritchie at Bell Labs ✔
C. Guido van Rossum
D. Bjarne Stroustrup

Correct answer: B. Dennis Ritchie at Bell Labs

22. C++ was developed by:

A. Dennis Ritchie
B. Bjarne Stroustrup ✔
C. Linus Torvalds
D. Ken Thompson only

Correct answer: B. Bjarne Stroustrup

23. Every C program starts execution from:

A. main() ✔
B. start()
C. init()
D. begin()

Correct answer: A. main()

24. #include <stdio.h> provides:

A. Standard input/output functions like printf ✔
B. Math functions only
C. Threads
D. String class

Correct answer: A. Standard input/output functions like printf

25. printf("%d", x) prints:

A. A string only
B. A character only
C. A float only
D. An integer value ✔

Correct answer: D. An integer value

Questions 26 to 50

26. scanf is used to:

A. Open files
B. Allocate memory
C. Read formatted input ✔
D. Print output

Correct answer: C. Read formatted input

27. The format specifier %f is used for:

A. Integers
B. Floating-point numbers ✔
C. Strings
D. Characters

Correct answer: B. Floating-point numbers

28. The format specifier %c is used for:

A. A string
B. A single character ✔
C. An integer
D. A float

Correct answer: B. A single character

29. The format specifier %s is used for:

A. A double
B. A character
C. An integer
D. A string ✔

Correct answer: D. A string

30. Each C statement ends with:

A. A full stop
B. A semicolon ✔
C. A comma
D. A colon

Correct answer: B. A semicolon

31. Single-line comments in C99 and C++ start with:

A. —
B. %%
C. // ✔
D. #

Correct answer: C. //

32. The size of char in C is:

A. 4 bytes
B. 8 bytes
C. 1 byte ✔
D. 2 bytes

Correct answer: C. 1 byte

33. An array in C is:

A. A function
B. A collection of elements of the same type in contiguous memory ✔
C. A linked list
D. A dynamic object always

Correct answer: B. A collection of elements of the same type in contiguous memory

34. Array indexing in C starts at:

A. 0 ✔
B. 1
C. -1
D. Any number

Correct answer: A. 0

35. A string in C is:

A. A pointer to int only
B. An array of characters ending with a null character ✔
C. A number
D. A built-in class

Correct answer: B. An array of characters ending with a null character

36. strlen() returns:

A. The first character
B. The memory address
C. The length of a string excluding the null terminator ✔
D. The size of the array

Correct answer: C. The length of a string excluding the null terminator

37. A pointer stores:

A. A copy of a value only
B. A memory address ✔
C. A file
D. A function name

Correct answer: B. A memory address

38. The & operator gives:

A. Logical AND only
B. Bitwise OR only
C. The value at an address
D. The address of a variable ✔

Correct answer: D. The address of a variable

39. The * operator on a pointer:

A. Dereferences it to access the value ✔
B. Deletes it
C. Multiplies addresses
D. Creates it

Correct answer: A. Dereferences it to access the value

40. NULL pointer means:

A. A pointer that does not point to any valid memory ✔
B. A function
C. A pointer to zero integer
D. A deleted variable

Correct answer: A. A pointer that does not point to any valid memory

41. malloc() is used to:

A. Read files
B. Allocate memory dynamically on the heap ✔
C. Print values
D. Free memory

Correct answer: B. Allocate memory dynamically on the heap

42. free() is used to:

A. Copy memory
B. Sort arrays
C. Allocate memory
D. Release dynamically allocated memory ✔

Correct answer: D. Release dynamically allocated memory

43. A memory leak occurs when:

A. Allocated memory is never freed ✔
B. Code compiles
C. Memory is freed twice
D. Variables are local

Correct answer: A. Allocated memory is never freed

44. A structure (struct) groups:

A. Variables of different types under one name ✔
B. Only functions
C. Only arrays of the same type
D. Only pointers

Correct answer: A. Variables of different types under one name

45. A union differs from a struct because:

A. All members share the same memory location ✔
B. Members are separate
C. It cannot hold data
D. It is a function

Correct answer: A. All members share the same memory location

46. typedef is used to:

A. Create an alias for a data type ✔
B. Allocate memory
C. Include headers
D. Define a function

Correct answer: A. Create an alias for a data type

47. Call by value passes:

A. A reference always
B. A copy of the argument ✔
C. Nothing
D. The address of the argument

Correct answer: B. A copy of the argument

48. Call by reference (using pointers) allows a function to:

A. Modify the caller’s variable ✔
B. Only read values
C. Return multiple types automatically
D. Avoid parameters

Correct answer: A. Modify the caller’s variable

49. Recursion is when:

A. A function calls itself ✔
B. A loop runs forever
C. A file is opened
D. A pointer is null

Correct answer: A. A function calls itself

50. A for loop is best when:

A. Never
B. The number of iterations is known ✔
C. Only once
D. Only for strings

Correct answer: B. The number of iterations is known

Questions 51 to 75

51. A do-while loop executes its body:

A. Never
B. At least once ✔
C. Twice always
D. Only when the condition is false initially

Correct answer: B. At least once

52. The switch statement selects code based on:

A. A file
B. A pointer
C. A class
D. The value of an expression ✔

Correct answer: D. The value of an expression

53. The break statement in a switch:

A. Ends the program
B. Exits the switch block ✔
C. Restarts the switch
D. Continues to next case always

Correct answer: B. Exits the switch block

54. fopen() is used to:

A. Close a file
B. Allocate memory
C. Open a file ✔
D. Print text

Correct answer: C. Open a file

55. fclose() is used to:

A. Read a line
B. Delete a file
C. Close an open file ✔
D. Open a file

Correct answer: C. Close an open file

56. The preprocessor directive #define is used to:

A. Define macros or constants ✔
B. Open files
C. Allocate memory
D. Declare functions

Correct answer: A. Define macros or constants

57. Header files typically contain:

A. Images
B. Only main()
C. Declarations of functions and macros ✔
D. Compiled binaries

Correct answer: C. Declarations of functions and macros

58. The sizeof operator returns:

A. The size in bytes of a type or variable ✔
B. The value
C. The number of elements always
D. The address

Correct answer: A. The size in bytes of a type or variable

59. Bitwise AND is written as:

A. and
B. &&
C. %
D. & ✔

Correct answer: D. &

60. Logical AND is written as:

A. AND
B. ++
C. &
D. && ✔

Correct answer: D. &&

61. The increment operator ++ increases a value by:

A. 10
B. 0
C. 2
D. 1 ✔

Correct answer: D. 1

62. In C++, cout is used to:

A. Allocate memory
B. Output data to the console ✔
C. Read input
D. Define classes

Correct answer: B. Output data to the console

63. In C++, cin is used to:

A. Open files
B. Read input from the console ✔
C. Free memory
D. Print output

Correct answer: B. Read input from the console

64. In C++, namespace std contains:

A. Only main
B. User-defined classes only
C. Only pointers
D. The standard library names ✔

Correct answer: D. The standard library names

65. A class in C++ is:

A. A user-defined type combining data and functions ✔
B. A pointer
C. A loop
D. A header file

Correct answer: A. A user-defined type combining data and functions

66. An object is:

A. A function
B. An instance of a class ✔
C. A macro
D. A header

Correct answer: B. An instance of a class

67. A constructor in C++:

A. Destroys an object
B. Initialises an object when it is created ✔
C. Prints output
D. Includes headers

Correct answer: B. Initialises an object when it is created

68. A destructor in C++ is named with:

A. A tilde followed by the class name ✔
B. The keyword end
C. A hash symbol
D. The keyword delete

Correct answer: A. A tilde followed by the class name

69. The new operator in C++:

A. Frees memory
B. Prints values
C. Includes headers
D. Allocates memory and calls a constructor ✔

Correct answer: D. Allocates memory and calls a constructor

70. The delete operator in C++:

A. Copies objects
B. Frees memory allocated with new ✔
C. Allocates memory
D. Creates objects

Correct answer: B. Frees memory allocated with new

71. Encapsulation in C++ uses:

A. Only pointers
B. Only macros
C. Access specifiers private, protected and public ✔
D. Only global variables

Correct answer: C. Access specifiers private, protected and public

72. By default, class members in C++ are:

A. public
B. private ✔
C. protected
D. static

Correct answer: B. private

73. By default, struct members in C++ are:

A. private
B. public ✔
C. static
D. protected

Correct answer: B. public

74. Inheritance in C++ allows:

A. Copying files
B. Including headers
C. A class to derive properties from another class ✔
D. Deleting objects

Correct answer: C. A class to derive properties from another class

75. A virtual function enables:

A. Runtime polymorphism via dynamic dispatch ✔
B. Faster macros
C. Compile-time only behaviour
D. Static variables

Correct answer: A. Runtime polymorphism via dynamic dispatch

Questions 76 to 100

76. A pure virtual function makes a class:

A. Final
B. Abstract ✔
C. Static
D. Template

Correct answer: B. Abstract

77. Function overloading means:

A. Inline functions only
B. Virtual functions only
C. Functions calling themselves
D. Multiple functions with the same name but different parameters ✔

Correct answer: D. Multiple functions with the same name but different parameters

78. Operator overloading allows:

A. Creating macros
B. Defining custom behaviour for operators with user-defined types ✔
C. Changing precedence
D. Removing operators

Correct answer: B. Defining custom behaviour for operators with user-defined types

79. A reference in C++ is:

A. A copy of a variable
B. A pointer that can be null
C. A macro
D. An alias for an existing variable ✔

Correct answer: D. An alias for an existing variable

80. Templates in C++ allow:

A. Only integers
B. Generic programming with type parameters ✔
C. Only strings
D. Runtime typing only

Correct answer: B. Generic programming with type parameters

81. The STL provides:

A. Only networking
B. Only databases
C. Only GUIs
D. Containers, algorithms and iterators ✔

Correct answer: D. Containers, algorithms and iterators

82. std::vector is:

A. A linked list
B. A fixed array only
C. A map
D. A dynamic array container ✔

Correct answer: D. A dynamic array container

83. std::map stores:

A. Unsorted duplicates
B. Sorted key-value pairs ✔
C. Only keys
D. Only values

Correct answer: B. Sorted key-value pairs

84. std::sort is:

A. A class
B. An STL algorithm to sort ranges ✔
C. A macro
D. A container

Correct answer: B. An STL algorithm to sort ranges

85. Exception handling in C++ uses:

A. try, throw and catch ✔
B. if and else only
C. switch
D. goto

Correct answer: A. try, throw and catch

86. Smart pointers like std::unique_ptr help to:

A. Replace classes
B. Create leaks
C. Disable exceptions
D. Manage memory automatically and prevent leaks ✔

Correct answer: D. Manage memory automatically and prevent leaks

87. std::shared_ptr uses:

A. Reference counting ✔
B. Garbage collection like Java
C. Static memory only
D. No tracking

Correct answer: A. Reference counting

88. RAII means:

A. Runtime allocation is invalid
B. Resources are tied to object lifetime and released in destructors ✔
C. Recursion as iteration
D. Random access in iterators

Correct answer: B. Resources are tied to object lifetime and released in destructors

89. The const keyword indicates:

A. A pointer to null
B. A variable that changes often
C. A value that should not be modified ✔
D. A loop

Correct answer: C. A value that should not be modified

90. static local variables:

A. Cannot be used
B. Retain their value between function calls ✔
C. Reset every call
D. Are global always

Correct answer: B. Retain their value between function calls

91. Undefined behaviour in C/C++ means:

A. The language standard places no requirements on the result ✔
B. The program always crashes
C. Behaviour is fully predictable
D. It is a compiler warning only

Correct answer: A. The language standard places no requirements on the result

92. A segmentation fault often occurs when:

A. Opening a valid file
B. Compiling successfully
C. Printing text
D. Accessing invalid memory ✔

Correct answer: D. Accessing invalid memory

93. GCC is:

A. A compiler for C, C++ and other languages ✔
B. A debugger only
C. A text editor
D. A database

Correct answer: A. A compiler for C, C++ and other languages

94. gdb is:

A. A debugger ✔
B. A linker only
C. An IDE only
D. A compiler

Correct answer: A. A debugger

95. The linker’s job is to:

A. Run the program
B. Write source code
C. Format code
D. Combine object files and libraries into an executable ✔

Correct answer: D. Combine object files and libraries into an executable

96. C is widely used for:

A. Only mobile UI
B. Only web front-ends
C. Operating systems and embedded systems ✔
D. Only spreadsheets

Correct answer: C. Operating systems and embedded systems

97. C++ is widely used for:

A. Only websites
B. Only spreadsheets
C. Only data entry
D. Games, high-performance systems and applications ✔

Correct answer: D. Games, high-performance systems and applications

98. The main difference between C and C++ is:

A. C++ has no pointers
B. C is newer
C. C has classes
D. C++ adds object-oriented and generic programming features ✔

Correct answer: D. C++ adds object-oriented and generic programming features

99. An infinite loop occurs when:

A. The loop is empty
B. The loop has a break
C. The loop runs once
D. The loop condition never becomes false ✔

Correct answer: D. The loop condition never becomes false

100. The modulus operator % returns:

A. The remainder of division ✔
B. The percentage
C. The product
D. The quotient

Correct answer: A. The remainder of division

How to Pass the C & C++ Programming Language Exam

  • Read every question carefully; most options look similar, so look for the most precise answer.
  • Revise the questions above topic by topic rather than memorising letters, because option order can change in the live test.
  • You need 80 correct answers out of 100 to pass, so aim to understand at least 85 to stay safe.
  • If you do not clear it on the first attempt, review the questions you missed and use the retake option.

Frequently Asked Questions

How many questions are in the C & C++ Programming Language Certification exam?

The exam has 100 multiple-choice questions, each worth 1 mark.

What is the passing score for the C & C++ Programming Language Certification?

You need at least 80% (80 out of 100) to pass and receive the certificate.

Can I retake the C & C++ Programming Language Certification exam?

Yes. If you score below 80%, you can retry the test after reviewing the topics.

Is the Itronix certificate verifiable?

Yes. Every certificate issued by Itronix Solutions has a unique ID that can be checked on the Itronix verify-certificate page.

More Programming & Development Certification Answers

Disclaimer: These answers are provided for learning and revision. Questions and answers are checked regularly; if you find a mistake, let us know in the comments.

About Priya Dogra

Priya Dogra runs priyadogra.com, where she shares free certification courses, internships, jobs, scholarships and exam preparation guides for Indian students and freshers. Follow her on YouTube, LinkedIn and Instagram for the latest opportunities.

Check Also

Unix/ Linux Certification exam answers 2026

Unix/ Linux Certification Exam Answers 2026 (All 100 Questions)

All 100 Unix/ Linux Certification exam questions with correct answers highlighted - updated 2026.

Leave a Reply

Your email address will not be published. Required fields are marked *