#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 / sumant

the output will be RamcoSystems
but we need 2 more libraries
#include<string.h> and
#include<alloc.h>
to run this program. in else case it will not work.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are predefined functions in c?

789


Write a program in c to replace any vowel in a string with z?

894


Explain how can I right-justify a string?

820


What are the 5 elements of structure?

826


What does calloc stand for?

854


Differentiate between the = symbol and == symbol?

941


Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?

891


Can we assign string to char pointer?

820


What happens if you free a pointer twice?

822


Can you mix old-style and new-style function syntax?

865


Explain how many levels deep can include files be nested?

841


if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0

1720


What is the use of #include in c?

815


Are global variables static in c?

893


What is a ternary operator in c?

860