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

write a program in c to merge two array

2 Answers  


Extend the sutherland-hodgman clipping algorithm to clip three-dimensional planes against a regular paralleiepiped

1 Answers   IBM,


which function is used to clear the buffer stream on gcc? for example: I wrote following code on gcc #include<stdio.h> int main(void) { char ch; int a,b; printf("\nenter two numbers:\t"); scanf("%d%d",&a,&b); printf("enter number is %d and %d",a,b); printf("\nentercharacter:\t"); scanf("%c",&ch); printf("enter character is %c",ch); return 0; } in above progarm ch could not be scan. why?plz tell me solution.

2 Answers  


why array index always strats wuth zero?

2 Answers  


Is this code legal? int *ptr; ptr = (int *) 0x400;

1 Answers  






How will u find whether a linked list has a loop or not?

8 Answers   Microsoft,


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,


main() { static int a[3][3]={1,2,3,4,5,6,7,8,9}; int i,j; static *p[]={a,a+1,a+2}; for(i=0;i<3;i++) { for(j=0;j<3;j++) printf("%d\t%d\t%d\t%d\n",*(*(p+i)+j), *(*(j+p)+i),*(*(i+p)+j),*(*(p+j)+i)); } }

1 Answers  


# include <stdio.h> int one_d[]={1,2,3}; main() { int *ptr; ptr=one_d; ptr+=3; printf("%d",*ptr); }

1 Answers  


why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?

0 Answers  


Given an array of size N in which every number is between 1 and N, determine if there are any duplicates in it. You are allowed to destroy the array if you like.

21 Answers   ABC, eBay, Goldman Sachs, Google, HUP, Microsoft, TATA,


write a program to count the number the same (letter/character foreg: 's') in a given sentence.

2 Answers  


Categories