Creado por Swapnil More
hace más de 8 años
|
||
Pregunta | Respuesta |
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]; }; |
¿Quieres crear tus propias Fichas gratiscon GoConqr? Más información.