#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
Is main is a keyword in c?
what is the syallabus of computer science students in group- 1?
hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm
Do you know the purpose of 'register' keyword?
How can you determine the maximum value that a numeric variable can hold?
Why & is used in c?
Multiply an Integer Number by 2 Without Using Multiplication Operator
What are the types of data structures in c?
What are data structures in c and how to use them?
How do you list a file’s date and time?
"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above
write a program in c language to print your bio-data on the screen by using functions.
Write a program of prime number using recursion.
Write program to remove duplicate in an array?
Can two or more operators such as and be combined in a single line of program code?