C | String | Question 13
int main() { char p[] = "geeksquiz"; char t; int i, j; for(i=0,j=strlen(p); i<j; i++) { t = p[i]; p[i] = p[j-i]; p[j-i] = t; } printf("%s", p); return 0; } |
chevron_right
filter_none
Output?
(A) ziuqskeeg
(B) Nothing is printed on the screen
(C) geeksquiz
(D) gggggggg
Answer: (B)
Explanation: The string termination character ‘\0’ is assigned to first element of array p[]
Quiz of this Question
Recommended Posts:
- C | String | Question 2
- C | String | Question 7
- C | String | Question 6
- C | String | Question 5
- C | String | Question 4
- C | String | Question 3
- C | String | Question 1
- C | String | Question 8
- C | String | Question 9
- C | String | Question 11
- C | String | Question 12
- C | String | Question 14
- C | String | Question 15
- C | String | Question 10
- C | String | Question 16



