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

What are the application of c?

0 Answers  


Explain the advantages and disadvantages of macros.

0 Answers   TCS,


When should you use a type cast?

0 Answers  


What is Your Name :)

1 Answers  


Can you mix old-style and new-style function syntax?

0 Answers  






What is the meaning of this decleration? unsigned char (*pArray[10][10]); please reply.

1 Answers  


how many errors in c explain deply

0 Answers  


What are structures and unions? State differencves between them.

0 Answers   iNautix,


What is s in c?

0 Answers  


Hai why 'c' is the middle language

4 Answers  


How can I make sure that my program is the only one accessing a file?

0 Answers  


What is meant by errors and debugging?

0 Answers  


Categories