Program to open a file with First argument

Answer Posted / kishore kumar naik p

void main(int nArgCount, char *szArgVector[])
{
if(nArgCount != 2)
{
printf("\nWorng number of argument\nSynatx: %s
<filename>",szArgVector[0]);
return;
}

FILE *fp = foepn(szArgVector[1],"r+");
//Process the file here
fclose(fp);
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by Encapsulation?

634


What is multilevel inheritance?

713


What are the data types in oop?

596


How to call a non virtual function in the derived class by using base class pointer

5237


Write a program to sort the number with different sorts in one program ??

1905






What is oops with example?

554


What are the two different types of polymorphism?

664


Prepare me a program for the animation of train

1977


What is the real time example of encapsulation?

582


Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box

2023


String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?

1931


Whats oop mean?

582


how to get the oracle certification? send me the answer

1654


c++ program to swap the objects of two different classes

1749


How do you achieve runtime polymorphism?

560