1.
The Expression, A=30*1000+2768 evaluates to ________________.
Correct Answer
A. -32768
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.
2.
The maximum value that an integer constant can have is ____________________.
Correct Answer
B. 3276700%
Explanation
The maximum value that an integer constant can have is 3276700%.
3.
C Language came into existence in the year ____________________.
Correct Answer
B. 1972
Explanation
C Language came into existence in the year 1972.
4.
Macros are defined using ___________________ statement.
Correct Answer
A. #define
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.
5.
____________________ of the following is allowed in a C arithmetic instruction.
Correct Answer
A. ()
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.
6.
The Maximum width of a C variable name can be ________________.
Correct Answer
B. 32 Character
Explanation
The maximum width of a C variable name can be 32 characters.
7.
________________ are the ASCII values for number 0-9.
Correct Answer
B. 48-57
Explanation
The ASCII values for numbers 0-9 range from 48 to 57.
8.
In the C Language ‘A’ represents ________________.
Correct Answer
B. A Character
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.
9.
To find factorial of A by using while loop, A will be ________________.
Correct Answer
B. A>0
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.
10.
The goto statement causes control to go to ___________________.
Correct Answer
B. A label
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.
11.
The Symbol && is read as ____________________.
Correct Answer
B. OR
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.
12.
An ___________________ is a collection of data items its called elements.
Correct Answer
A. Array
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.
13.
___________________ does not represent a valid storage class in “C”.
Correct Answer
B. Union
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.
14.
In ‘C’ logical AND operator is represented as ___________________.
Correct Answer
A. Binary
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.
15.
___________________ keyword is used to exit loops at arbitrary spots.
Correct Answer
A. Break
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.
16.
The ___________________ loop executes at least once.
Correct Answer
A. Break
Explanation
The "Break" loop executes at least once because it is designed to break out of a loop or terminate the loop prematurely.
17.
In face “++” has a higher precendence than “*”.
Correct Answer
B. False
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.
18.
Null will be defined as something else.
Correct Answer
B. False
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.
19.
Scanf function is used to display information on the Monitor.
Correct Answer
B. False
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.
20.
A for loop is used to execute a section of code a specific number of times.
Correct Answer
A. True
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.
21.
A do while loop is very similar to a while loop.
Correct Answer
A. True
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.
22.
The break key word allows you to jump out of any loop at any time.
Correct Answer
A. True
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.
23.
The continue keyword is used in loops to skip right to the test condition.
Correct Answer
A. True
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.
24.
The Return Statement is optional.
Correct Answer
A. True
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.
25.
In C all function except main() can be called recursively.
Correct Answer
B. False
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.
26.
In function two return statement should never occur.
Correct Answer
B. False
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.
27.
C program is developed with the help of C++ language.
Correct Answer
B. False
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.
28.
If Else statement is used when both the statements are False.
Correct Answer
B. 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.
29.
“C” language has been developed by “Dennis Ritchie”.
Correct Answer
A. True
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.
30.
The maximum width of a “C” variable name can be 10 character.
Correct Answer
B. False
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.
31.
“C” is a low level language.
Correct Answer
B. False
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.
32.
Do while loop tests the condition at the End of the Loop.
Correct Answer
B. False
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.
33.
A flowchart is graphical representation of an algorithm.
Correct Answer
A. True
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.
34.
An algorithm consists of a set of explicit and unambiguous finite steps.
Correct Answer
A. True
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.
35.
The C programming language was developed by Charles Babbage.
Correct Answer
B. False
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.
36.
The C complier runs a program called the C Processor.
Correct Answer
A. True
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.
37.
Strcpy is used to copy the string.
Correct Answer
A. True
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.
38.
Pointer is mainly used Point out the Function.
Correct Answer
B. False
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.
39.
A Header File is a file that contains Definitions and Macros.
Correct Answer
B. False
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.
40.
A link is a Complier.
Correct Answer
B. False
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.