MCQ Practice Single Best Answer Topic: String in C Language

Q What will be the correct output of the following program?

#include<string.h>
void main()
{
   char str[] = "C EXAMINATION", rev[17];
   int i = strlen(str), j=0;
   for( ; i>=0; rev[j++] = str[i--]);
   rev[j] = '*';
   puts(rev);
}

Question ID
#1443
Subchapter
String in C Language
Action
Choose one option below

Choose Your Answer

Click an option to check whether your answer is correct.

  • A NOITANIMAXE C
  • B NOITANIMAXE
  • C C
  • D No output at all.
Correct Answer: D

Explanation

No output at all.

Share This Question

Share this MCQ with your friends or study group.