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



main() { char *a = "Hello "; char *b = "World"; clrscr()..

Answer / guest

b)

Is This Answer Correct ?    11 Yes 3 No

main() { char *a = "Hello "; char *b = "World"; clrscr()..

Answer / manju

Ans. C
No space between hello and world

Is This Answer Correct ?    4 Yes 2 No

main() { char *a = "Hello "; char *b = "World"; clrscr()..

Answer / bhavsaramol9911

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

Post New Answer

More C Code Interview Questions

why the range of an unsigned integer is double almost than the signed integer.

1 Answers  


abcdedcba abc cba ab ba a a

2 Answers  


main() { char *p; int *q; long *r; p=q=r=0; p++; q++; r++; printf("%p...%p...%p",p,q,r); }

1 Answers  


How do you write a program which produces its own source code as its output?

7 Answers  


what is the output of following program ? void main() { int i=5; printf("%d %d %d %d %d ",i++,i--,++i,--i,i); }

10 Answers  






respected sir, i did my MCA in 2013 when i am going to attend to an interview i was asked about my project how will i explain my project could please help me in this and my project title is "Social Networking Site For Social Responsibility"

1 Answers   Genpact, Ozdocs,


Write a Program that Inputs 10 Numbers in an Array and Show the Maximum Number

2 Answers   Ace Info,


#define a 10 int main() { printf("%d..",a); foo(); printf("%d..",a); return 0; } void foo() { #undef a #define a 50 }

3 Answers  


main() { int a=2,*f1,*f2; f1=f2=&a; *f2+=*f2+=a+=2.5; printf("\n%d %d %d",a,*f1,*f2); }

6 Answers  


main() { char *p="GOOD"; char a[ ]="GOOD"; printf("\n sizeof(p) = %d, sizeof(*p) = %d, strlen(p) = %d", sizeof(p), sizeof(*p), strlen(p)); printf("\n sizeof(a) = %d, strlen(a) = %d", sizeof(a), strlen(a)); }

1 Answers  


main() { void swap(); int x=10,y=8; swap(&x,&y); printf("x=%d y=%d",x,y); } void swap(int *a, int *b) { *a ^= *b, *b ^= *a, *a ^= *b; }

2 Answers  


main() { extern i; printf("%d\n",i); { int i=20; printf("%d\n",i); } }

1 Answers  


Categories