C Programming 2

Description

Believe that.
Swapnil More
Flashcards by Swapnil More, updated more than 1 year ago
Swapnil More
Created by Swapnil More over 8 years ago
6
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

Similar

Honors Biology Chapter 10 Test 10.1 Info Cell Growth, Division and Reproduction
kala.eddy011
Ch. 10 Quiz
Mariah Felty
Module 2 Study Guide
amatthews1
Chapter 10 Key Terms
june.campbell836
Chapter 10 Key Terms
Janeal Grisak
psychology
Annette Ramirez
Honors Biology Chapter 10 Test 10.2 The Process of Cell Division
kala.eddy011
MATH Notes Chapter 10
Bernice M
10 Launching the New Ship of State, 1789-1800
Shari Anderson
Key Terms: Chapter 10- Simple Interest
JOHNA THARP