How can I read a directory in a C program?

Answers were Sorted based on User's Feedback



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

Answer / sathish

In Linux/Unix , we have the header file dirent.h.This .h
file contains the direcory manipulation functions Some of
the functions are opendir,closedir,readdir.

Is This Answer Correct ?    7 Yes 1 No

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

Answer / hussain reddy

#include<stdio.h>
void main()
{
printf("%s",_agrv[0]);
}

Is This Answer Correct ?    2 Yes 9 No

Post New Answer

More C Interview Questions

What does calloc stand for?

0 Answers  


What is the right way to use errno?

0 Answers  


Why is c called a mid-level programming language?

0 Answers  


Write one statement equalent to the following two statements x=sqr(a); return(x); Choose from one of the alternatives a.return(sqr(a)); b.printf("sqr(a)"); c.return(a*a*a); d.printf("%d",sqr(a));

6 Answers   TCS,


What is the use of the function in c?

0 Answers  


write a program to find lcm and hcf of two numbers??

1 Answers  


Write a client and server program in C language using UDP, where client program interact with the Server as given below: i) The client begins by sending a request to send a string of 8 characters or series of 7 numbers, the server sends back a characters or numbers as per the request of the client. ii) In case of series of 7 numbers: The client sends a multiplication of numbers, to the server. iii) In case of a string of 8 characters: The client sends a reverse order of string to the server.. iv) Server will send an acknowledgment to the client after receiving the correct answer

0 Answers   Ignou, Microsoft,


which is faster execution: loops or recursion?

3 Answers  


Explain the importance and use of each component of this string: Foo.Bar, Version=2.0.205.0, Culture=neutral, PublicKeyToken=593777ae2d274679d

1 Answers   TCS,


who is the father of C Language?

20 Answers   CTS, UST,


How can draw a box in cprogram without using graphics.h header file & using only one printf(); ?

4 Answers   NIIT,


how many times does the loop iterated ? for (i=0;i=10;i+=2) printf("Hi\n");

9 Answers   TCS,


Categories