C Programming MCQs
10 practice MCQs on this page Page 3 of 3
Tap an option to check your answer — the correct answer and full explanation appear after you choose.
ProgrammingC Programming ETEAID: LTP-5859
In assembly language, the symbols used instead of binary code are called _____?
- AVariables
- BMnemonics ✓ Correct answer
- CFunnomic
- DNone of these
✓ Correct answer: Mnemonics
Full explanation
Mnemonics. In assembly language, symbols used instead of binary code are called mnemonics.
ProgrammingC Programming ETEAID: LTP-5860
In Scratch control blocks, the _____ command is used when a block of code needs to run for a fixed number of times.
- AWait
- BStop
- CNone of these
- DRepeat ✓ Correct answer
✓ Correct answer: Repeat
Full explanation
Repeat. The repeat block in Scratch runs a block of code a fixed number of times.
ProgrammingC Programming ETEAID: LTP-5880
The getche() function reads a character from the keyboard and ____ it on the screen.
- AHides
- BEchoing ✓ Correct answer
- CErasers
- DNone of these
✓ Correct answer: Echoing
Full explanation
Echoing. The getche() function reads a character from the keyboard and echoes it on the screen.
ProgrammingC Programming ETEAID: LTP-5883
What is the purpose of using a flowchart in analyzing an algorithm?
- ATo compile the program
- BTo identify logical errors and weakness ✓ Correct answer
- CTo create a user interface
- DNone of these
✓ Correct answer: To identify logical errors and weakness
Full explanation
To identify logical errors and weakness. A flowchart helps in analysing an algorithm by identifying logical errors and weaknesses.
ProgrammingC Programming ETEAID: LTP-5885
Loops within loops are called _____ loops.
- ARecursive
- BConditional
- CNested ✓ Correct answer
- DNone of these
✓ Correct answer: Nested
Full explanation
Nested. Loops within loops are called nested loops.
ProgrammingC Programming ETEAID: LTP-6014
In C++ the body of the function is enclosed which?
- A( )
- B[ ]
- C{ } ✓ Correct answer
- D" "
✓ Correct answer: { }
Full explanation
{ }. In C++, the body of a function is enclosed in curly braces.
ProgrammingC Programming FPSCID: FPP-11402
In C, the size of an int is typically:
- A2 bytes
- B1 byte
- C4 bytes ✓ Correct answer
- D8 bytes
✓ Correct answer: 4 bytes
Full explanation
In C, the size of an int is typically 4 bytes on most modern systems.
ProgrammingC Programming BPSCID: BPP-3696
The size of an int variable in C on a typical 32-bit system is?
- A2 bytes
- B4 bytes ✓ Correct answer
- C8 bytes
- D1 byte
✓ Correct answer: 4 bytes
Full explanation
On a typical 32-bit system, an int occupies 4 bytes of memory.
ProgrammingC Programming BPSCID: BPP-3697
Which loop in C checks the condition after executing the body at least once?
- Ado-while loop ✓ Correct answer
- Bwhile loop
- Cfor loop
- Dnested for loop
✓ Correct answer: do-while loop
Full explanation
The do-while loop executes its body first and then checks the condition, so it runs at least once.
ProgrammingC Programming BPSCID: BPP-3698
In C, the value of the expression 5 % 3 is?
- A2 ✓ Correct answer
- B1
- C0
- D3
✓ Correct answer: 2
Full explanation
The modulus operator gives the remainder: 5 % 3 = 2.
Practice these MCQs interactively
← Programming MCQs