#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
any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()
What is meant by type specifiers?
Which is better malloc or calloc?
Is it better to use a macro or a function?
What is the difference between typedef struct and struct?
Explain what is wrong with this statement? Myname = ?robin?;
List the difference between a 'copy constructor' and a 'assignment operator' in C?
Why main is used in c?
How to Throw some light on the splay trees?
Explain how can I manipulate strings of multibyte characters?
how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....
What are the types of type specifiers?
What is meant by operator precedence?
Why is c used in embedded systems?
What are Macros? What are its advantages and disadvantages?