#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

What are file streams?

562


Explain what math functions are available for integers? For floating point?

608


What is a struct c#?

599


A c program to display count values from 0 to 100 and flash each digit for a secong.reset the counter after it reaches 100.use for loop,. pls guys hepl me.. :(

1731


What are header files? What are their uses?

632






What does the message "automatic aggregate intialization is an ansi feature" mean?

689


What is a program flowchart and explain how does it help in writing a program?

667


Can you think of a logic behind the game minesweeper.

2004


Are the variables argc and argv are local to main?

780


Can we increase size of array in c?

534


What is the difference between text and binary modes?

637


Why c is procedure oriented?

565


What is structure in c definition?

568


What is the best way of making my program efficient?

561


write a program to find the given number is prime or not

3833