main()
{
char *a = "Hello ";
char *b = "World";
clrscr();
printf("%s", strcat(a,b));
}
a. Hello
b. Hello World
c. HelloWorld
d. None of the above
Answers were Sorted based on User's Feedback
Its B...
because there is a Space after Hello and then concate second string i.e World
so OUTPUT Hello World
| Is This Answer Correct ? | 1 Yes | 0 No |
What is the output for the program given below typedef enum errorType{warning, error, exception,}error; main() { error g1; g1=1; printf("%d",g1); }
main() { int i=400,j=300; printf("%d..%d"); }
int a = 10 + 10 .... ,... A = A * A What would be the value of A? The answer is 120!! Could anyone explain this to me.
2 Answers Bosch, eInfochips, HCL, IHCL,
main() { char *p="hai friends",*p1; p1=p; while(*p!='\0') ++*p++; printf("%s %s",p,p1); }
main() { clrscr(); } clrscr();
In a gymnastic competition, scoring is based on the average of all scores given by the judges excluding the maximum and minimum scores. Let the user input the number of judges, after that, input the scores from the judges. Output the average score. Note: In case, more than two judges give the same score and it happens that score is the maximum or minimum then just eliminate two scores. For example, if the number of judges is 5 and all of them give 10 points each. Then the maximum and minimum score is 10. So the computation would be 10+10+10, this time. The output should be 10 because 30/3 is 10.
#include<stdio.h> main() { FILE *ptr; char i; ptr=fopen("zzz.c","r"); while((i=fgetch(ptr))!=EOF) printf("%c",i); }
main() { int i=5,j=10; i=i&=j&&10; printf("%d %d",i,j); }
void main() { int c; c=printf("Hello world"); printf("\n%d",c); }
Finding a number multiplication of 8 with out using arithmetic operator
WAP to display 1,2,3,4,5........N
main() { char string[]="Hello World"; display(string); } void display(char *string) { printf("%s",string); }