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...


How can I read a directory in a c program?



How can I read a directory in a c program?..

Answer / banavathvishnu

int main(int argc,char *argv[])
{

printf("%s \n",argv[0]);
return 1;
}
will give you the path where the executable is stored.

Is This Answer Correct ?    8 Yes 1 No

Post New Answer

More C Interview Questions

Explain what is the general form of a c program?

0 Answers  


what is available in C language but not in C++?

10 Answers   CTS, TCS,


can you change name of main()?how?

3 Answers   HCL, Siemens,


main() { int x=5,y=10,z=0; x=x++ + y++; y=y++ + ++x; z=x++ + ++y; printf("%d%d%d\n",x,y,z); }

1 Answers   CodeChef,


how i m write c program 1.check prime number 2.prime number series

1 Answers  


Tell me is null always defined as 0(zero)?

0 Answers  


What is c programming structure?

0 Answers  


what is difference between procedural language and functional language ?

4 Answers   Wipro,


what is the output of the following program? main() { int i=-1,j=-1,k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d %d %d %d %d",i,j,k,l,m); }

7 Answers  


Can you please explain the difference between malloc() and calloc() function?

0 Answers  


How would you obtain the current time and difference between two times?

0 Answers   TISL,


in one file global variable int i; is declared as static. In another file it is extern int i=100; Is this valid ?

2 Answers   NetApp,


Categories