Computer Science · C Programming
char a[] = 'this', b[] = 'this'; // Line 1
while (*a != '\0' && *b != '\0') { // Line 2
if (*a != *b) // Line 3
printf('Not same'); // Line 4
++a; // Line 5
++b; // Line 6
}
if (*a == '\0' && *b == '\0') // Line 7
printf('Same'); // Line 8
- 1All the lines
- 2Line 5 and Line 6✓
- 3Line 5 only
- 4Line 1, Line 2 and Line 3
Correct answer
Line 5 and Line 6
Download Single Question PDF
Save this question and verified answer as a clean study sheet with live clickable link.
Share with Friends & Study Groups
Challenge your peer aspirants on WhatsApp or Telegram to solve this question!
Preparing for Computer Science?
Practice full-length Computer Science mock tests with real exam timers, instant score analysis, and all-India ranking.
Want more practice questions on C Programming?
Solve complete topic-wise tests with detailed solutions on GkGet.
Related Practice Questions
Recommended practice questions in Computer Science · C Programming