#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 return a keyword in c?
Why is main function so important?
What is the explanation for the dangling pointer in c?
Give me the code of in-order recursive and non-recursive.
What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?
how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.
What is the symbol indicated the c-preprocessor?
How will you write a code for accessing the length of an array without assigning it to another variable?
How can I read data from data files with particular formats?
Did c have any year 2000 problems?
How can I send mail from within a c program?
What is variable initialization and why is it important?
what are the facialities provided by you after the selection of the student.
Is it possible to initialize a variable at the time it was declared?
Why is a semicolon (;) put at the end of every program statement?