Computer Language Questions Practice Question and Answer
8 Q: Which of the following are Operators in C?
604 063e62c1aef10d51b16bfe124
63e62c1aef10d51b16bfe124- 1arithmetic operatorsfalse
- 2logical operatorfalse
- 3relational operatorsfalse
- 4all of the abovetrue
- Show AnswerHide Answer
- Workspace
- SingleChoice
Answer : 4. "all of the above"
Explanation :
Operators are symbols that we use when performing operations on one or more operands. The primary types of operators in C are arithmetic, logical, relational, conditional, bitwise, and assignment.
Q: Why is clrscer() used?
449 063e62bb3e6cd351b75eca59e
63e62bb3e6cd351b75eca59e- 1to erasefalse
- 2to clear the message from the screentrue
- 3to storefalse
- 4for all of the abovefalse
- Show AnswerHide Answer
- Workspace
- SingleChoice
Answer : 2. "to clear the message from the screen"
Explanation :
The clrscr in C is a built-in function that is used for clearing the screen of the console output during the execution of the C program. This function is defined in the conio. h header file. We need to include the “conio.
Q: What is the difference between do-while and while condition?
590 063e62b5c7407bd1b2d1dd823
63e62b5c7407bd1b2d1dd823- 1In do-while, a semicolon is used after the condition.false
- 2Semicolon is not used in Whilefalse
- 3While statement is after the conditionfalse
- 4none of the abovetrue
- Show AnswerHide Answer
- Workspace
- SingleChoice
Answer : 4. "none of the above"
Explanation :
The key difference lies in when the loop condition is checked. In the while loop, the condition is checked before the first iteration, potentially resulting in zero iterations. In the do-while loop, the condition is checked after the first iteration, ensuring that the loop body is executed at least once.
Q: Which of the following is not true for for-loop?
561 063e62af66149271af9b8c0fa
63e62af66149271af9b8c0fa- 1for (i=0; ifalse
- 2for (int i=0; i>9; i++)false
- 3for (i=10; ifalse
- 4for (i=10; i++; itrue
- Show AnswerHide Answer
- Workspace
- SingleChoice
Answer : 4. "for (i=10; i++; i"
Explanation :
Among the given statements about for loops, the one that is NOT true is that they are used to replace user input while loops. While for loops are typically used for iterations with a known count and are less likely to result in an infinite loop if used correctly, they do not specifically replace user input while loops.
Q: Array is used for-
637 063ede73a7312b71d33e25e8d
63ede73a7312b71d33e25e8d- 1To store the value in memoryfalse
- 2To delete the value in memoryfalse
- 3for outputfalse
- 4all of the abovetrue
- Show AnswerHide Answer
- Workspace
- SingleChoice
Answer : 4. "all of the above"
Explanation :
An array is used to store values in memory. Arrays allow you to store multiple values of the same data type under a single variable name, making it easier to manage and manipulate data in programming. Arrays are commonly used in various programming languages for tasks such as storing collections of data, performing calculations on large sets of values, and iterating through elements to process them. Arrays are not used for deleting values in memory or for output; their primary purpose is to store and organize data.
Q: With which of the following is the Break statement used?
531 063ede5893c221e1b4dd104fd
63ede5893c221e1b4dd104fd- 1if Statementfalse
- 2else if Statementfalse
- 3Switch Statementtrue
- 4None of thesefalse
- Show AnswerHide Answer
- Workspace
- SingleChoice
Answer : 3. "Switch Statement"
Explanation :
The break statement is used with loops (such as for and while loops) and switch statements in programming. In loops, it is used to exit the loop prematurely, while in a switch statement, it is used to exit the switch block after executing a specific case.
Q: What is it called when more than one if-statement is used together?
517 063ede4ad7312b71d33e25815
63ede4ad7312b71d33e25815- 1if-else statementfalse
- 2nested statementtrue
- 3more if statementsfalse
- 4None of the abovefalse
- Show AnswerHide Answer
- Workspace
- SingleChoice
Answer : 2. "nested statement"
Explanation :
Certainly! A nested if statement refers to an if statement that is placed inside another if statement or other control structures. It allows for more specific conditions and complex decision-making in a program. The inner if statement is only executed if the outer if statement's condition is true.
Q: Computer language FORTRAN is useful in which field?
839 062ff6b11047feb079270c5d9
62ff6b11047feb079270c5d9- 1businessfalse
- 2Drawingfalse
- 3Sciencetrue
- 4Commercefalse
- Show AnswerHide Answer
- Workspace
- SingleChoice
Answer : 3. "Science"
Explanation :
FORTRAN (short for "Formula Translation") is a high-level programming language that is particularly well-suited for scientific and engineering applications. It was developed for numeric and scientific computing and is widely used in fields such as physics, engineering, mathematics, and other scientific disciplines. FORTRAN allows for efficient processing of mathematical and scientific computations, making it a popular choice for complex scientific simulations, mathematical modeling, and computational research.