How can I read a directory in a C program?
Answers were Sorted based on User's Feedback
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 |
Answer / hussain reddy
#include<stdio.h>
void main()
{
printf("%s",_agrv[0]);
}
| Is This Answer Correct ? | 2 Yes | 9 No |
main() { struct test { char c; int i; char m; } t1; printf("%d %d\n", sizeof(t1), sizeof(t1.c)); }
1 Answers Vector, Vector India,
Is there anything like an ifdef for typedefs?
What is modifier & how many types of modifiers available in c?
Explain how can I pad a string to a known length?
How to write the code of the program to swap two numbers with in one statement?
What does extern mean in a function declaration?
How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?
Why c is called free form language?
Explain the meaning of keyword 'extern' in a function declaration.
2. What is the function of ceil(X) defined in math.h do? A)It returns the value rounded down to the next lower integer B)it returns the value rounded up to the next higher integer C)the Next Higher Value D)the next lower value
write a pgm to print 1 1 2 1 1 2 3 2 1 1 2 3 4 3 2 1
Explain how do you print only part of a string?