Sail E0 Webinar

MCQs

Total Questions : 33 | Page 4 of 4 pages
Question 31. What will be the correct output of the following program?
#include
void main()
{
char str[] = "C EXAMINATION", rev[17];
int i = strlen(str), j=0;
for( ; i>=0; rev[j++] = str[i--])
rev[j] = str[j] ;
puts(rev);
}
  1.    NOITANIMAXE C
  2.    NOITANIMAXE
  3.    C
  4.    No output at all.
  5.    Syntax error
 Discuss Question
Answer: Option D. -> No output at all.
Question 32. The function sprintf() works like printf(), but operates on ..........
  1.    Data file
  2.    stderr
  3.    string
  4.    stdin
  5.    no such function in 'C'.
 Discuss Question
Answer: Option C. -> string
Question 33. String concatenation means -
  1.    Combining two strings.
  2.    Extracting a substring out of a string.
  3.    Partitioning the string into two strings.
  4.    Merging two strings.
  5.    Comparing the two strings to define the larger one.
 Discuss Question
Answer: Option A. -> Combining two strings.

Latest Videos

Latest Test Papers