Determine Output:
#include
#define a 10
void main()
{
#define a 50
printf("%d", a);
}
Answer: A
No answer description available for this question.
Enter details here
The header file assert.h of the C Standard Library defines ________macro.
Answer: D
No answer description available for this question.
Enter details here
Data written into a file using fwrite() can be read back using fscanf()
Answer: B
fwrite() - Unformatted write in to a file.
fscanf() - Formatted read from a file.
Enter details here
The itoa function can convert an integer in decimal, octal or hexadecimal form to a string.
Answer: A
No answer description available for this question.
Enter details here
MB_CUR_MAX is not defined in stdlib.h.
Answer: B
No answer description available for this question.
Enter details here
What will function gcvt() do?
Answer: B
No answer description available for this question.
Enter details here
Will the program outputs "IndiaBIX.com"?
#include
#include
int main()
{
char str1[] = "IndiaBIX.com";
char str2[20];
strncpy(str2, str1, 8);
printf("%s", str2);
return 0;
}
Answer: B
No. It will print something like 'IndiaBIX(some garbage values here)' .
Because after copying the first 8 characters of source string into target string strncpy() doesn't terminate the target string with a '\0'. So it may print some garbage values along with IndiaBIX.
Enter details here
If the two strings are found to be unequal then strcmp returns difference between the first non-matching pair of characters.
Answer: A
No answer description available for this question.
Enter details here
The assert macro returns__________value.
Answer: D
No answer description available for this question.
Enter details here
void free(void *p) performs which of the following functions?
Answer: B
void free(void *p);
This function de-allocates space to which p points(if p is not NULL).
Enter details here