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

Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.

0 Answers  


main() {char a[10]={1,2,3,4,5,6};int x; for(x=0;x<4;x++){ b[x]=x+'a';} printf("%s",b);}

3 Answers  


c program to add and delete an element from circular queue using array

3 Answers  


Why header files are used?

0 Answers  


Explain how can you tell whether a program was compiled using c versus c++?

0 Answers  


which types of data structure will i use to convert infix to post fix???

5 Answers   IIT,


Write a C++ program to give the number of days in each month according to what the user entered. example: the user enters June the program must count number of days from January up to June

0 Answers  


what will happen if you free a pointer twice after allocating memory dynamically ?

3 Answers   Novell,


Explain this code. #include <stdio.h> void f1(int *k) { *k = *k + 10; } main ( ){ int i; i = 0; printf (" The value of i before call %d \n", i); f1 (&i); printf (" The value of i after call %d \n", i); }

3 Answers   IBM,


What are the languages are portable and platform independent?Why they are like that?

1 Answers   Excel, Satyam,


what is the little endian and big endian?

1 Answers  


Explain what is meant by high-order and low-order bytes?

0 Answers  


Categories