#include<stdio.h>
int main()
{
printf(5+"IndiaBIX\n");
return 0;
}
A -
Error
B -
IndiaBIX
C -
BIX
D -
None of above
5-
What will be the output of the program ?
#include<stdio.h>
#include<string.h>
int main()
{
char sentence[80];
int i;
printf("Enter a line of text\n");
gets(sentence);
for(i=strlen(sentence)-1; i >=0; i--)
putchar(sentence[i]);
return 0;
}
A -
The sentence will get printed in same order as it entered
#include<stdio.h>
int main()
{
int i;
char a[] = "\0";
if(printf("%s", a))
printf("The string is not empty\n");
else
printf("The string is empty\n");
return 0;
}
A -
The string is not empty
B -
The string is empty
C -
No output
D -
0
10-
What will be the output of the program ?
#include<stdio.h>
#include<string.h>
int main()
{
char str1[5], str2[5];
int i;
gets(str1);
gets(str2);
i = strcmp(str1, str2);
printf("%d\n", i);
return 0;
}