Sunday, 21 January 2018

Program for Read File


Program for Read File
#include<stdio.h>
#include<conio.h>
main()
{
FILE *fp;
char ch;
clrscr();
fp=fopen("sunil.c","r");
if(fp==NULL)
{
printf("file not found.....");
}
else
{
while(!feof(fp))
{
ch=fgetc(fp);
printf("%c",ch);
delay(1000000);
}
}
getch();
fclose(fp);
}�

Related Posts:

  • Unions Unions  As array represent group of data items that belong to the same type. C supports  a  constructed data type known as structure and unino, which are methods for packing data of different types. … Read More
  • Enumerated Data Type Enumerated Data Type     This is one of the user defined datatypes. The use of this datatype is to make programs more readable.It allows you to create your own datatype with predefined values. Though its form … Read More
  • Introduction To Storage Classes Introduction To Storage Classes strong class provides information about their location and visibility.The storage class decides the portion of the program within which the variables are recognized. A variables storage cl… Read More
  • Two-Dimentional Arrays Two-Dimentional Arrays So far we have discussed the array variable that can store a list of values .There will be situation where a table of values will have to be stored.Consider the following data table, which shows t… Read More
  • Pointers And Structures Pointers And Structures  We know that the name of an array stands for the address of its zeroth element.The same thing is true of the names of  arrays of structure variables.Suppose product is an array variabl… Read More

0 comments:

Post a Comment