C Programming 2

Description

Believe that.
Swapnil More
Flashcards by Swapnil More, updated more than 1 year ago
Swapnil More
Created by Swapnil More about 9 years ago
8
0
1 2 3 4 5 (0)

Resource summary

Question Answer
Structures declaration and initialization.
Opening a File fp=fopen("file-name","mode");
closing a file fclose(fp1); fclose(fp2);
getc/fgetc ch=getc(fp);
putc/fputc putc(ch,fp);
getw() getw(fp);
putw() putw(integer,fp);
fscanf() fscanf(fp,"control string",&list)
fprintf() fprintf(fp,"control string",list)
fgets fgets(sptr,n,fp)
fputs() fputs(sptr,fp)
fread() fread(&struct variable,size of srruct variable,number of times,fp);
fwrite() fwrite(&struct variable,size of struct variable,number of times,fp);
ftell() n=ftell(fp)
rewind() rewind(fp); n=ftell(fp);
ferror() ferror(fp);
feo() feo(fp);
malloc() ptr=(cast_type*) malloc(byte_size);
calloc() ptr=(cast_type*) calloc(n,element_size);
free() free(ptr);
realloc() ptr=malloc(size);
program malloc p=(int *)malloc(n*2);
calloc() program p=(int*) calloc(n,2);
what is structure? a structure is a tool for handling a logically related data items.
array within stucture. e.g struct stud { char name[20]; int roll_no; int marks[3]; };
Show full summary Hide full summary

0 comments

There are no comments, be the first and leave one below:

Similar

Ch. 10 Quiz
Mariah Felty
Module 2 Study Guide
amatthews1
Chapter 10 Key Terms
june.campbell836
Chapter 10 Key Terms
Janeal Grisak
10 Launching the New Ship of State, 1789-1800
Shari Anderson
psychology
Annette Ramirez
Honors Biology Chapter 10 Test 10.2 The Process of Cell Division
kala.eddy011
MATH Notes Chapter 10
Bernice M
Key Terms for Chapter 10
Laura Samuelson