#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 is pointer to pointer in c language?
What is meant by realloc()?
When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?
What is function and its example?
What does p mean in physics?
Linked list is a Linear or non linear explain if linear how it working as a non linear data structures
How can a program be made to print the name of a source file where an error occurs?
Why C language is a procedural language?
Difference between goto, long jmp() and setjmp()?
What is meant by preprocessor in c?
When should the const modifier be used?
What is .obj file in c?
What is the use of clrscr?
What is a shell structure examples?
what is stack , heap ,code segment,and data segment