#include<stdio.h>
int main( int argc, char *argv[])
{
FILE *p;
if(!argv[1])
{
printf("can't open the file");
}
else
p=fopen("venki.txt","r" );
return 0;
}
Using parameters argc and argv, and library functions fopen, fprintf, fclose
There are many different operators, which are you referring to?
void mynullfunction () {;}
write a sample program using asp.net explaining all the syntax and semantics of the program
The execution path of a program can only be affected by the program input. That is, if you change the input, you can alter the way the program behaves (just as changing the arguments to a function can alter the behaviour of the function). Typically you will alter the input via the command line, but you can also alter the input at any time during program execution. Redirecting input via the command line can be achieved by extracting the input from a file (via std::cin) or by implementing command line switches in your main function, or through a combination of the two.
write a vb program to find the magic square
Write and run a client and a server program in C-language using UDP
You would have to use a command script program, and write a program that could be programmed into the micro processing chip inside. Using a program like Visual Basic.
write a c++ program to convert binary number to decimal number by using while statement
Some syntax is different.
Java program without mainWe need a main method for executing a program.But YES we can write a program without using main() method.TRICK 1 of 2 :: while writing applets in java we don't use main... we use init() method instead.TRICK 2 of 2 :: using 'static' we can write a program whic will execute successfully and output the desired message on screen. Here it is :: class Mohit{ static { System.out.println("This java program has run without the main method"); System.exit(0); } } -->save the program as Mohit.java to compile::javac Mohit.java (in command prompt) to run ::java Mohit(command prompt) output will be ::This java program has run without the main methodWhoa!!!!! we are done.;)
HIYou can first include the 1st program in ur 2nd program using # include and then whatever be the output from frst it can be used in second program.pankajThat's what popen is good for. Read the manual.