#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 is %s and %d in c?
What are the complete rules for header file searching?
What are the types of i/o functions?
Why should I use standard library functions instead of writing my own?
what is the structure pointer?
what is the different bitween abap and abap-hr?
if p is a string contained in a string?
Why doesnt long int work?
Do you know the purpose of 'register' keyword?
the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b
how to capitalise first letter of each word in a given string?
How many levels of pointers can you have?
Why is c called "mother" language?
How variables are declared in c?
using for loop sum 2 number of any 4 digit number in c language