What is the correct way to round offx, a float, to an int value?
Answer: A
No answer description available for this question.
Enter details here
What is the output of this C code?
int main()
{
printf("C programming %s", "Class by\n%s AllIndiaExams", "SUPER");
}
Answer: C
This program has only one %s within first double quotes, so it does not read the string “SUPER”.
The %s along with the AllIndiaExams is not read as a format modifier while new line character prints the new line.
Enter details here
As soon as a pointer variable is freed, its value
Answer: D
No answer description available for this question.
Enter details here
An external variable
Answer: D
No answer description available for this question.
Enter details here
Which of the following comments regarding the reading of a string, using scanf(with optional) and get is true?
Answer: C
No answer description available for this question.
Enter details here
For the following code snippet:
char *str = “Sanfoundry.com\0” “training classes”;
The character pointer str holds reference to string:
Answer: B
’\0′ is accepted as a char in the string. Even though strlen will give length of string “Sanfoundry.com”, in memory str is pointing to entire string including training classes”
Enter details here
Choose the correct statements
Answer: D
No answer description available for this question.
Enter details here
Which of the following is true of external variables?
Answer: D
No answer description available for this question.
Enter details here
What is the output of this C code?
#include
int main()
{
printf("sanfoundry\rclass\n");
return 0;
}
Answer: C
No answer description available for this question.
Enter details here
The program fragment
int i = 263 ;
putchar (i) ;
prints
Answer: C
263 in binary form is 100000111. If one tries to print an integer as a character, only the last 8 bits will be considered - the rest chopped off. So, in this case the ASCII value of 00000111 will be printed
Enter details here