#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 is pointer to pointer in c language?

824


What is meant by realloc()?

938


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?

1060


What is function and its example?

929


What does p mean in physics?

831


Linked list is a Linear or non linear explain if linear how it working as a non linear data structures

1984


How can a program be made to print the name of a source file where an error occurs?

1027


Why C language is a procedural language?

842


Difference between goto, long jmp() and setjmp()?

978


What is meant by preprocessor in c?

775


When should the const modifier be used?

893


What is .obj file in c?

877


What is the use of clrscr?

836


What is a shell structure examples?

845


what is stack , heap ,code segment,and data segment

2469