Which of the following is the correct code?
Answer: A
No answer description available for this question.
Enter details here
The prototypes of all standard library string functions are declared in the file string.h.
Answer: A
string.h is the header in the C standard library for the C programming language which contains macro definitions, constants, and declarations of functions and types used not only for string handling but also various memory handling functions.
Enter details here
The macros defined under the header file limits.h are not defined under any other header file.
Answer: B
No answer description available for this question.
Enter details here
Initial seed is ________ for the function srand(unsigned int seed).
Answer: B
void srand(unsigned int seed);
This function returns a new sequence of pseudo-random numbers using the specified seed.Initial seed is 1.
Enter details here
Which of the given options is an array type used for holding information?
Answer: C
No answer description available for this question.
Enter details here
What will the function randomize() do in Turbo C under DOS?
Answer: C
No answer description available for this question.
Enter details here
What will be the output of the program?
#include
#include
int main()
{
char *i = "55.555";
int result1 = 10;
float result2 = 11.111;
result1 = result1+atoi(i);
result2 = result2+atof(i);
printf("%d, %f", result1, result2);
return 0;
}
Answer: C
No answer description available for this question.
Enter details here
ftell() returns the current position of the pointer in a file stream.
Answer: A
No answer description available for this question.
Enter details here
Which of the following macros is not defined?
Answer: A
No answer description available for this question.
Enter details here
What will be the output of the program?
#include
int main()
{
int i;
char c;
for(i=1; i<=5; i++)
{
scanf("%c", &c); /* given input is 'b' */
ungetc(c, stdout);
printf("%c", c);
ungetc(c, stdin);
}
return 0;
}
Answer: C
The ungetc() function pushes the character c back onto the named input stream, which must be open for reading.
This character will be returned on the next call to getc or fread for that stream.
One character can be pushed back in all situations.
A second call to ungetc without a call to getc will force the previous character to be forgotten.
Enter details here