How Os Works

By admin, February 15, 2010 10:39 am

How SUSE OS works? n how to write C Program to open any text file through program?

Plz, can any one give me code for opening FILE through C PROGRAM for SUSE OPERATING SYSTEM bcoz i tried it as we do in windows but it is giving me error like SEGMENTATION FAULT n that’s why i am not getting output from rest of the program as well Please, answer me quick!!!!!!

This kind of thing works for me on openSUSE 11.2:

#include

void main(void)
{
int a, b, c;
FILE *fp;

fp = fopen(“filename.txt”, “r”);
fscanf(fp, “%d %d %d”, &a, &b, &c);
printf(“%d, %d, %dn”, a, b, c);
fclose(fp);
}

PCSX Mac OS X How to Make it Work


Comments are closed

Panorama Theme by Themocracy