#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
What are the advantages of using linked list for tree construction?
What are identifiers and keywords in c?
What is data type long in c?
What is volatile keyword in c?
what is the different bitween abap and abap-hr?
a c code by using memory allocation for add ,multiply of sprase matrixes
how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software
What are the benefits of organizational structure?
How will you find a duplicate number in a array without negating the nos ?
How many levels of pointers can you have?
What is s in c?
What are the types of type qualifiers in c?
Explain how do you generate random numbers in c?
Can you please explain the difference between malloc() and calloc() function?
explain what are pointers?