Vous êtes sur la page 1sur 1

Assignment

Sub: Computer Programming Class 2K10-CSE

Last date: 15-07-2011

Q.01 Q.02

What are the storage classes available in c language? What will be the output of the following code.? Explain your answer void main () { int i = 0 , a[3] ; a[i] = i++; printf (%d",a[i]) ; } Predict the output for the following program main() { int c[ ]={2.8,3.4,4,6.7,5}; int j,*p=c,*q=c; for(j=0;j<5;j++) { printf(" %d ",*c); ++q; } for(j=0;j<5;j++){ printf(" %d ",*p); ++p; }} What are the restrictions of a modulus operator? When does the compiler not implicitly generate the address of the first element of an array? What is a function and built-in function? When does the compiler not implicitly generate the address of the first element of an array? What is the difference between null array and an empty array? Write a program using an array that computes the sum and the average of nth input values from the keyboard and prints the calculated sum and average. Is it possible to execute code even after the program exits the main() function? What is an argument ? differentiate between formal arguments and actual arguments? Suggest the output for the below programs and explain your answer #include<stdio.h> #include<stdio.h> #include<conio.h> void printf(char *ch); void main() void main() { { char ch; char ch[40]; FILE *fp; printf("Enter the string"); fp=fopen("prog.c","r"); gets(ch); if(fp) printf(ch); while((ch=fgetc(fp))!=EOF) } printf("%c",ch); void printf(char *ch) else { printf("unable to open file"); printf("%s",ch); getch(); } } What is the difference between printf( ) and sprintf( ) ? How to use the cprintf,cscanf,sscanf,sprintf,vsscanf,vsprintf,vscanf & vprintf?

Q.03

Q.04 Q.05 Q.06 Q.07 Q.08 Q.09

Q.10 Q.11 Q.12

Q.13 Q.14

Vous aimerez peut-être aussi