Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Can we include one C program into another C program if yes how?

Answers were Sorted based on User's Feedback



Can we include one C program into another C program if yes how?..

Answer / vinay kashyap

may be using the preprocessor directives.. like..

#include "prog1.c"
#include<stdio.h>
int main()
{
.
.
.
.
}

Is This Answer Correct ?    15 Yes 7 No

Can we include one C program into another C program if yes how?..

Answer / dennis richie

@ answer 3:
der can't b multiple declaration of main...

Is This Answer Correct ?    8 Yes 2 No

Can we include one C program into another C program if yes how?..

Answer / krishhna

We can include the another c program so before that the program which you are going to include should be coppied to c:>tc\include directory

Is This Answer Correct ?    2 Yes 0 No

Can we include one C program into another C program if yes how?..

Answer / abhradeep chatterjee

I think its not possible.

Is This Answer Correct ?    12 Yes 12 No

Can we include one C program into another C program if yes how?..

Answer / amegha

can include another file by using preprocessor directive.
#include<program1.c>
#include<stdio.h>
main()
{
-----
-----
}

Is This Answer Correct ?    4 Yes 4 No

Can we include one C program into another C program if yes how?..

Answer / cheers!

You can include a C file in an another file as depicted in the above example.
And you can also include an another process call ( which is basically a program) in a running program like..

int main()
{
main() // example 1
system("./RunMyProg"); // example 2
system("ls -l"); // example 3
}

Is This Answer Correct ?    0 Yes 7 No

Can we include one C program into another C program if yes how?..

Answer / yogesh bansal

Not Sure..But If the below way is correct. then yes, we can
do that

#include <stdio.h>
int main()
{
printf("this is first program\n");
int main()
{
printf("this is second program\n");
return 0;
}
main();
return 0;
}

Is This Answer Correct ?    7 Yes 28 No

Post New Answer

More C Interview Questions

Differentiate b/w Modify and Update commands giving example.

1 Answers  


what is the difference between malloc() and calloc() function?

1 Answers  


Write a program in c using only loops to print * * * * * *******

2 Answers   IBM,


How does memset() work in C?

2 Answers  


Describe the steps to insert data into a singly linked list.

0 Answers  


Explain the difference between malloc() and calloc() function?

0 Answers  


List the difference between a "copy constructor" and a "assignment operator"?

0 Answers   Accenture,


How can you be sure that a program follows the ANSI C standard?

0 Answers   Aspire, Infogain,


PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE

0 Answers  


main() { intx=2,y=6,z=6; x=y=z; printf(%d",x) }

5 Answers   Amazon, HCL, Thought Works,


What does return 1 means in c?

0 Answers  


#include<stdio.h> #include<conio.h> void main() { int m=0111,n=20; printf("%d%d\n",m,n); getch(); }

1 Answers  


Categories