NTA Computer Science and Technology 1 ā Questions and Answers
Question 1: Which data structure operates on a LIFO (Last In, First Out) principle?
- Stack (Correct answer)
- Queue
- Linked List
- Tree
Correct answer: Stack
A stack follows LIFO, where the last element inserted is the first one to be removed.
Question 2: What does HTML stand for?
- HyperText Markup Language (Correct answer)
- High Transfer Markup Language
- HyperText Modern Language
- High Text Markup Language
Correct answer: HyperText Markup Language
HTML stands for HyperText Markup Language, the standard language for creating web pages.
Question 3: Which sorting algorithm has the best average-case time complexity?
- Merge Sort (Correct answer)
- Bubble Sort
- Selection Sort
- Insertion Sort
Correct answer: Merge Sort
Merge Sort has an average-case time complexity of O(n log n), better than O(n²) algorithms.
Question 4: In binary, the decimal number 10 is represented as:
- 1010 (Correct answer)
- 1001
- 1100
- 1011
Correct answer: 1010
10 in decimal = 8+2 = 2³+2¹, which is represented as 1010 in binary.
Question 5: Which protocol is used to send email over the internet?
- SMTP (Correct answer)
- FTP
- HTTP
- IMAP
Correct answer: SMTP
SMTP (Simple Mail Transfer Protocol) is the standard protocol used for sending emails.
Question 6: What is the output of: 5 % 3 in most programming languages?
- 2 (Correct answer)
- 1
- 0
- 5
Correct answer: 2
The modulo operator (%) returns the remainder of division: 5 Ć· 3 = 1 remainder 2.
Which data structure operates on a LIFO (Last In, First Out) principle?