Can we include one C program into another C program if yes how?
Answers were Sorted based on User's Feedback
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 |
Answer / dennis richie
@ answer 3:
der can't b multiple declaration of main...
Is This Answer Correct ? | 8 Yes | 2 No |
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 |
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 |
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 |
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 |
Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me
who invented c
Write a C program that computes the value ex by using the formula ex =1+x/1!+x2/2!+x3+3!+………….
Explain can static variables be declared in a header file?
What is an array in c?
Explain how are portions of a program disabled in demo versions?
#include<stdio.h> main() { int i=5; printf("%d",i*i-- - --i*i*i++ + ++i); } tell the answer with correct reason .specially reason is important nt answer ans by turbo c is -39
if the area was hit by a virus and so the decrease in the population because of death was x/3 and the migration from other places increased a population by 2x then annually it had so many ppl. find our the population in the starting.
write a program to display the numbers in the following format 4 4 3 3 3 3 2 2 2 2 2 2 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 4
how to implement stack operation using singly linked list
When should you use a type cast?
How can you find out how much memory is available?