FOPEN using Read Mode C Programming Tamil


#include<stdio.h>
#include<conio.h>
void main()
{
    FILE *f;
    int a[100],b[100],i;
    char str[100][100];
    clrscr();
    f=fopen("tjs.c","r");
    if(f==NULL)
    {
	printf("\nUnable to open the file ");
	exit();
    }
    for(i=0;feof(f)==0;i++)
    {
	fscanf(f,"%s",str[i]);
	fscanf(f,"%d",a[i]);
	fscanf(f,"%d",b[i]);
	printf("\nName    :%s",str[i]);
	printf("\nIDno    :%d",a[i]);
	printf("\nSalary  :%d",b[i]);
    }
    fclose(f);
    getch();
}

Login To Download Source Code

Leave a Comment:

Login To Comment

List Of Programs


Goto Examples

Operators

Looping

Number Conversion

Pattern Design

Arrays

Matrix Examples

Sorting Examples

String Function

Change Case

String In C

Maths Functions

User Defined Functions

Recursive Functions

Pointer

Structure

File Concept

Calender Programming