C Programming Questions: Trivia Quiz! Exam

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By SPACECOMPUTER
S
SPACECOMPUTER
Community Contributor
Quizzes Created: 10 | Total Attempts: 56,607
| Attempts: 1,663 | Questions: 40
Please wait...
Question 1 / 40
0 %
0/100
Score 0/100
1. "C" language has been developed by "Dennis Ritchie".

Explanation

The statement is true because the C language was indeed developed by Dennis Ritchie. He created it in the early 1970s at Bell Labs. C language is a general-purpose programming language that has been widely used for developing various applications and operating systems. Its simplicity and efficiency have made it popular among programmers.

Submit
Please wait...
About This Quiz
C Programming Questions: Trivia Quiz! Exam - Quiz

Do you think you are an expert with C Programming Language? This quiz highlights specific pertinent questions such as the maximum value of an integer constant when C Language was created, what is permitted in C arithmetic instruction, and a collection of data items called elements. C language is basic,... see moreyet it can be challenging to learn. This quiz is the ultimate test on C Programming. see less

Personalize your quiz and earn a certificate with your name on it!
2. A flowchart is graphical representation of an algorithm.

Explanation

A flowchart is a visual representation that depicts the steps or actions involved in an algorithm. It uses different shapes and symbols to represent various operations, decisions, and inputs/outputs. By using flowcharts, complex processes or algorithms can be simplified and easily understood. Therefore, the statement "A flowchart is a graphical representation of an algorithm" is true.

Submit
3. Strcpy is used to copy the string.

Explanation

The statement is true because strcpy is indeed a function in C/C++ that is used to copy one string to another. It takes two arguments - the destination string where the copied string will be stored, and the source string which will be copied. This function is commonly used when we want to duplicate or manipulate strings in programming.

Submit
4.  In the C Language 'A' represents ________________.

Explanation

In the C Language, 'A' represents a character. In C, characters are enclosed in single quotation marks, and 'A' is a specific character representation. Characters in C can represent letters, digits, or special symbols, and 'A' specifically represents the uppercase letter A.

Submit
5. The Maximum width of a C variable name can be ________________.

Explanation

The maximum width of a C variable name can be 32 characters.

Submit
6.  ____________________ of the following is allowed in a C arithmetic instruction.

Explanation

In a C arithmetic instruction, using parentheses () is allowed. Parentheses are used to group sub-expressions and control the order of evaluation in an expression. They are used to override the default precedence of operators and ensure that certain operations are performed before others. By using parentheses, the programmer can make the expression clearer and avoid any ambiguity in the calculation.

Submit
7. ___________________ keyword is used to exit loops at arbitrary spots.

Explanation

The keyword "break" is used to exit loops at arbitrary spots. It is commonly used in programming languages like C, C++, and Java. When the "break" statement is encountered within a loop, the loop is immediately terminated and the program execution continues to the next statement after the loop. This allows for more control and flexibility in loop execution, as it allows programmers to exit the loop based on certain conditions or events.

Submit
8. A for loop is used to execute a section of code a specific number of times.

Explanation

A for loop is a control structure in programming that allows a section of code to be executed repeatedly for a specific number of times. It consists of an initialization statement, a condition statement, an increment statement, and the code block to be executed. The loop continues until the condition statement evaluates to false. Therefore, the given statement is true, as a for loop is indeed used to execute a section of code a specific number of times.

Submit
9. The C programming language was developed by Charles Babbage.

Explanation

The given statement is false. The C programming language was not developed by Charles Babbage. It was actually developed by Dennis Ritchie at Bell Labs in the early 1970s. Charles Babbage is known as the "father of the computer" for his work on the Analytical Engine, but he did not develop the C programming language.

Submit
10.  In 'C' logical AND operator is represented as ___________________.

Explanation

In the programming language 'C', the logical AND operator is represented as "Binary". This means that when using the logical AND operator in 'C', it performs a binary operation on two operands. The operator returns true if both operands are true, otherwise it returns false.

Submit
11. The ___________________ loop executes at least once.

Explanation

The "Break" loop executes at least once because it is designed to break out of a loop or terminate the loop prematurely.

Submit
12. An ___________________ is a collection of data items its called elements.

Explanation

An array is a collection of data items called elements. Arrays are used to store multiple values of the same data type in contiguous memory locations. Each element in an array can be accessed using its index value, which represents its position in the array. Arrays provide a convenient way to store and manipulate large amounts of data efficiently.

Submit
13. To find factorial of A by using while loop,  A will be ________________.

Explanation

In order to find the factorial of A using a while loop, the condition in the while loop should be A>0. This means that the loop will continue executing as long as A is greater than 0. This is necessary because the factorial of a number is calculated by multiplying all the numbers from 1 to that number, and the loop needs to continue until it reaches 1.

Submit
14. The maximum value that an integer constant can have is ____________________.

Explanation

The maximum value that an integer constant can have is 3276700%.

Submit
15. The break key word allows you to jump out of any loop at any time.

Explanation

The break keyword is used in programming to exit or terminate a loop prematurely. When the break keyword is encountered within a loop, it immediately terminates the loop and program execution continues with the next statement after the loop. Therefore, it allows you to jump out of any loop at any time. So, the given statement is true.

Submit
16.  C program is developed with the help of C++ language.

Explanation

The given statement is false because C and C++ are two separate programming languages. While C++ is an extension of the C language and includes all of its features, C programs cannot be developed with the help of C++ language. C and C++ have different syntax and features, and although C++ can incorporate C code, they are not interchangeable.

Submit
17. C Language came into existence in the year ____________________. 

Explanation

C Language came into existence in the year 1972.

Submit
18. The maximum width of a "C" variable name can be 10 character.

Explanation

The statement is false because the maximum width of a "C" variable name is not limited to 10 characters. In the C programming language, variable names can be up to 31 characters long, consisting of letters, digits, and underscores. The only restriction is that the first character must be a letter or an underscore. Therefore, the statement is incorrect.

Submit
19. An algorithm consists of a set of explicit and unambiguous finite steps.

Explanation

An algorithm is a precise set of instructions or steps that are followed to solve a problem or complete a task. These steps must be clear, specific, and limited in number, meaning that they are finite. Additionally, the instructions must be unambiguous, meaning that there is no room for interpretation or confusion. Therefore, the statement "An algorithm consists of a set of explicit and unambiguous finite steps" is true, as it accurately describes the characteristics of an algorithm.

Submit
20. Macros are defined using ___________________ statement.

Explanation

Macros are defined using the "#define" statement. This statement is used in programming languages like C and C++ to define macros, which are essentially preprocessor directives that allow for the definition of constants or functions. The "#define" statement is followed by the name of the macro and its corresponding value or code. This allows for the easy substitution of the macro with its defined value throughout the code, providing a convenient way to simplify and reuse code.

Submit
21.  The Return Statement is optional.

Explanation

The return statement is optional in programming languages. This means that it is not always necessary to include a return statement in a function or method. If a return statement is not included, the function will still execute and perform any other actions or calculations specified within it, but it will not return a value. Including a return statement allows the function to return a specific value or result back to the caller. However, if a return statement is not needed or desired, it can be omitted.

Submit
22. The continue keyword is used in loops to skip right to the test condition.

Explanation

The continue keyword is used in loops to skip the current iteration and move directly to the next iteration, without executing any further code within the loop for that iteration. This allows the loop to skip certain iterations based on a specific condition, and continue with the next iteration. Therefore, the statement "The continue keyword is used in loops to skip right to the test condition" is true.

Submit
23. The C complier runs a program called the C Processor.

Explanation

The C compiler is responsible for translating the C code into machine-readable instructions. It takes the source code as input and processes it to generate an executable program. The compiler performs various tasks such as lexical analysis, syntax analysis, semantic analysis, and code generation. The C Processor mentioned in the question is likely referring to the compiler itself, as it is the program that processes the C code. Therefore, the statement "The C compiler runs a program called the C Processor" is true.

Submit
24. A do while loop is very similar to a while loop.

Explanation

A do while loop is indeed very similar to a while loop. Both loops are used for repetitive execution of a block of code based on a condition. The main difference is that in a do while loop, the block of code is executed at least once before checking the condition. After the first execution, the condition is checked, and if it is true, the loop continues. If the condition is false, the loop is terminated. This behavior makes the do while loop suitable for situations where the block of code needs to be executed at least once, regardless of the condition.

Submit
25. If Else statement is used when both the statements are False.

Explanation

The statement "If Else statement is used when both the statements are False" is incorrect. The If Else statement is used when there is a condition that can be either true or false. If the condition is true, the code inside the If block is executed, otherwise, the code inside the Else block is executed. Therefore, the correct answer is False.

Submit
26. "C" is a low level language.

Explanation

The statement "C is a low level language" is false. C is actually considered a high-level programming language. It provides a level of abstraction from the underlying hardware and allows for more efficient and portable programming compared to low-level languages like assembly language.

Submit
27.  ________________ are the ASCII values for number 0-9.

Explanation

The ASCII values for numbers 0-9 range from 48 to 57.

Submit
28. Scanf function is used to display information on the Monitor.

Explanation

The given statement is incorrect. The scanf function is not used to display information on the monitor. Instead, it is used to read input from the user. The printf function is used to display information on the monitor.

Submit
29.  ___________________ does not represent a valid storage class in "C".

Explanation

In the C programming language, "union" does not represent a valid storage class. The storage classes in C are "auto", "register", "static", and "extern". "Union" is not a storage class, but rather a data structure that allows different data types to be stored in the same memory location. Therefore, "union" is not a valid answer for this question.

Submit
30. A link is a Complier.

Explanation

The statement "A link is a Compiler" is false. A link refers to the process of combining multiple object files to create an executable file. It is a separate step in the compilation process. On the other hand, a compiler is a software program that translates source code into object code or machine code. While a link is a part of the overall compilation process, it is not the same as a compiler.

Submit
31. Null will be defined as something else.

Explanation

The statement "Null will be defined as something else" is false. In programming, null is a special value that represents the absence of a value or a null reference. It is not defined as something else.

Submit
32. The goto statement causes control to go to ___________________.

Explanation

The goto statement causes control to go to a specific location in the code, which is identified by a label. This allows the program to jump to a different part of the code and continue execution from there. The label serves as a marker or identifier for the location where the control should be transferred to.

Submit
33. Pointer is mainly used Point out the Function.

Explanation

Pointers in programming languages are primarily used to store memory addresses and manipulate data indirectly. They are not specifically used to point out functions. Functions can be called directly without the need for pointers. Therefore, the given statement is false.

Submit
34. In face "++" has a higher precendence than "*".

Explanation

The statement is false because in mathematics, the operator "*" (multiplication) has a higher precedence than the operator "++" (increment). This means that when evaluating an expression, any multiplication operation will be performed before any increment operation.

Submit
35.  In function two return statement should never occur.

Explanation

The statement is false because in a function, it is possible to have multiple return statements. The return statement is used to end the execution of a function and return a value. Depending on the logic and requirements of the function, there may be multiple points where a return statement is needed. So, it is not true that return statements should never occur in a function.

Submit
36. In C all function except main() can be called recursively.

Explanation

In C, all functions can be called recursively, not just main(). Recursion is a programming technique where a function calls itself. This allows for solving complex problems by breaking them down into smaller, more manageable subproblems. Therefore, the correct answer is False.

Submit
37. The Expression, A=30*1000+2768 evaluates to ________________.

Explanation

The given expression, A=30*1000+2768, can be simplified by first multiplying 30 and 1000, which equals 30000. Then, adding 2768 to 30000 gives us a final value of 32768. Therefore, the correct answer is 32768.

Submit
38. Do while loop tests the condition at the End of the Loop.

Explanation

The given statement is false. In a do-while loop, the condition is tested at the end of the loop. This means that the loop will always execute at least once, regardless of the condition being true or false.

Submit
39. The Symbol && is read as ____________________.

Explanation

The symbol && is commonly read as "AND" in programming languages, but in this case, the correct answer is "OR". This may be because the question is referring to a specific programming language or context where the symbol && is used to represent the logical OR operator.

Submit
40. A Header File is a file that contains Definitions and Macros.

Explanation

A header file is a file that contains declarations and definitions of functions, variables, and other objects that can be used in a program. It typically includes function prototypes, type definitions, and macro definitions, but does not contain actual implementations or executable code. Therefore, a header file does not contain definitions and macros, but rather declarations and other necessary information for using them. Hence, the given statement is false.

Submit
View My Results

Quiz Review Timeline (Updated): Mar 21, 2023 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • May 31, 2012
    Quiz Created by
    SPACECOMPUTER
Cancel
  • All
    All (40)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
"C" language has been developed by "Dennis Ritchie".
A flowchart is graphical representation of an algorithm.
Strcpy is used to copy the string.
 In the C Language 'A' represents ________________.
The Maximum width of a C variable name can be ________________.
 ____________________ of the following is allowed in a C...
___________________ keyword is used to exit loops at arbitrary spots.
A for loop is used to execute a section of code a specific number of...
The C programming language was developed by Charles Babbage.
 In 'C' logical AND operator is represented as...
The ___________________ loop executes at least once.
An ___________________ is a collection of data items its called...
To find factorial of A by using while loop,  A will be...
The maximum value that an integer constant can have is...
The break key word allows you to jump out of any loop at any time.
 C program is developed with the help of C++ language.
C Language came into existence in the year ____________________. 
The maximum width of a "C" variable name can be 10 character.
An algorithm consists of a set of explicit and unambiguous finite...
Macros are defined using ___________________ statement.
 The Return Statement is optional.
The continue keyword is used in loops to skip right to the test...
The C complier runs a program called the C Processor.
A do while loop is very similar to a while loop.
If Else statement is used when both the statements are False.
"C" is a low level language.
 ________________ are the ASCII values for number 0-9.
Scanf function is used to display information on the Monitor.
 ___________________ does not represent a valid storage class in...
A link is a Complier.
Null will be defined as something else.
The goto statement causes control to go to ___________________.
Pointer is mainly used Point out the Function.
In face "++" has a higher precendence than "*".
 In function two return statement should never occur.
In C all function except main() can be called recursively.
The Expression, A=30*1000+2768 evaluates to ________________.
Do while loop tests the condition at the End of the Loop.
The Symbol && is read as ____________________.
A Header File is a file that contains Definitions and Macros.
Alert!

Advertisement