Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


Program to open a file with First argument



Program to open a file with First argument..

Answer / 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

More OOPS Interview Questions

Why u change company?

12 Answers   BOB Technologies,


function overridind means and simple program

2 Answers  


explain sub-type and sub class? atleast u have differ it into 4 points?

0 Answers   Infosys,


What is encapsulation in ict?

0 Answers  


why the memory allocated with new cant be freed using free()

2 Answers  






1.explicit call for destructor 2.calling function inside a constructor. 3.base *b-new derived delete b; 4.delete p what it will delete. 5.size of base class and derived class int i,in base class and int j in derived. 6.int i-20 int main() { int i =5; printf("%d".::i); { int i =10; printf("%d".::i); } } 7.object slicing 8.new 9.function overloading(return type). 10.class base() { virtuval fun() { ----- } } class derivied:public base() { fun() { ----- } } int main() { derived d; } 11.how static function will call in C++? 12.default structures are in C++? 13.constructors should be in public . 14.virtuval constructor not exist. 15.multilevel inhritence. destructor order.

1 Answers   Tech Mahindra,


What are the benefits of interface?

0 Answers  


What is Object and Class? What are the differences between them?

5 Answers  


Name an advantage of linked list over array?

11 Answers   IBM, Infosys,


What is encapsulation selenium?

0 Answers  


how do u initialize the constant variables

5 Answers   IBM, Siemens,


explain the concepts of oops?

1 Answers  






Categories