#include<stdio.h>
main()
{
char *p1;
char *p2;
p1=(char *) malloc(25);
p2=(char *) malloc(25);
strcpy(p1,"Ramco");
strcpy(p2,"Systems");
strcat(p1,p2);
printf("%s",p1);
}
Tell me the output?
Answer Posted / v.srinivasan
#include<stdio.h>
main()
{
char *p1,*p2;
p1 = (char *)malloc(25);
p2 = (char *)malloc(25);
strcpy(p1,"Ramco");
strcpy(p2,"Systems");
strcat(p1,p2);
printf("%s",p1);
}
the output will be RamcoSystems
we don't need the following libraries under Linux 2.6
#include<string.h> and
#include<alloc.h>
to run this program.
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
Where are c variables stored in memory?
Write a program to use switch statement.
Explain how do you use a pointer to a function?
What is bash c?
What is the difference between break and continue?
write a c program in such a way that if we enter the today date the output should be next day's date.
How will you delete a node in DLL?
When can you use a pointer with a function?
Is c procedural or functional?
Hai sir, I had planned to write the NIC scientific engineer exam , plz post the sample question......
What is wrong with this initialization?
What is wrong with this program statement?
Can one function call another?
Write a program to implement queue.
please explain every phase in the "SDLC" in the dotnet.