#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


Please Help Members By Posting Answers For Below Questions

Is return a keyword in c?

604


Why is main function so important?

619


What is the explanation for the dangling pointer in c?

684


Give me the code of in-order recursive and non-recursive.

890


What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?

819






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.

1216


What is the symbol indicated the c-preprocessor?

700


How will you write a code for accessing the length of an array without assigning it to another variable?

622


How can I read data from data files with particular formats?

607


Did c have any year 2000 problems?

660


How can I send mail from within a c program?

586


What is variable initialization and why is it important?

623


what are the facialities provided by you after the selection of the student.

1664


Is it possible to initialize a variable at the time it was declared?

765


Why is a semicolon (;) put at the end of every program statement?

632