Quantcast
Channel: Webminal - Latest topics
Viewing all articles
Browse latest Browse all 484

Prog#245: file is available or not

$
0
0

@angala wrote:

/*
file is available or not 
Program#245
*/
#include<stdio.h>
main(int argc,char *argv[])
{
int i;
if(argc!=2)
{
printf("error: no.of arg");
return 0;
}
i=access(argv[1],0);
if(i==0)
printf("file is available in the directory");
else
printf("file is not available in the directory");
}

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 484

Trending Articles