#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
What are predefined functions in c?
Write a program in c to replace any vowel in a string with z?
Explain how can I right-justify a string?
What are the 5 elements of structure?
What does calloc stand for?
Differentiate between the = symbol and == symbol?
Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?
Can we assign string to char pointer?
What happens if you free a pointer twice?
Can you mix old-style and new-style function syntax?
Explain how many levels deep can include files be nested?
if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0
What is the use of #include in c?
Are global variables static in c?
What is a ternary operator in c?