ExamVeda
Login
Home
61
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] =  str[j] ;
   puts(rev);
}
Discuss
Answer & Solution
Answer: Option D
Solution:

As i is with the length of string and hence in array rev the contents are copied as "\0 NOITANIMAXE C". But while displaying those contents with puts function it stops because of the first character '\0' and hence no output.

62
The function sprintf() works like printf(), but operates on ..........
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
63
String concatenation means -
Discuss
Answer & Solution
Answer: Option A
Solution:

Concatenation means combining two strings together (appending the second at the end of first one).

64
errno causes trouble in two subtler ways(vague and explicit).
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
65
What do the following C function do?
int isgraph(int c);
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
66
The . . . . . . . . function tests for any character for which isalpha or isdigit is true.
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
67
There are two groups of string functions defined in the header <string.h>. What are they?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
68
What error occurs when a result is unde?ned for a given argument value?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
69
What is the prototype of strcoll() function?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
70
What is the return value of strxfrm()?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board