Data Types, Variables and Storage Classes
Description: C Language- Data types,variables and storage Classes | |
Number of Questions: 25 | |
Created by: Amal Dixit | |
Tags: C Language- Data types variables and storage Classes General Awareness and Computer Applications Computer Applications (New) IT Companies C Language Fundamentals of Computer Programming Number System and Its Application Java/Oracle /C/C++ |
What will be the output of the following C code? void main() { int t; char *pc=(char *)0; float *pf=(float *)0; t=(int)(pc+1) + (int)(pf+1); printf(%d,t); }
What will be the output of the following C code? int T; static T= 8; extern T; void main() { printf(%d,T); }
What will be the output of the following C code? void main() { char ch=321; printf(%d %c,ch,ch); }
What will be the output of following C code? void main() { int t,*pt; register int y,*py; pt=&t; py=&y; t=10; y=90; printf(%d %d,*pt,*py); }
Find the output of the following C code. void main() { char Rch; int Rn; float Rr; printf(%d %d %d, sizeof(Rch),sizeof(Rn),sizeof(Rr)); }
What will be the output of the following C code? void main() { static int t=7; printf(%d,t); if(t--) main(); }
What will be the output of the following C code? void main() { int T='T'; printf(%c,T+6); }
If the input of the following program is 10, what will be the output? void print(int); void main() { int n; scanf(%d,&n); print(n); } void print(static int x) { int i; for(i=1;i<=x;i++) printf(%d,i); }
By which values are t and c initialized to print - 25536 and - 20536, respectively? void main() { int t=__,c=__; printf(%d %d,t,c); }
What will be the output of the following C code? void main() { printf(Hello ); printf(World); }
Which of the following symbols cannot print directly through printf statement?
What error will occur while running the following program? void main() { int const *t=8; printf(%d,++(*t)); }
What will be the output of the following C code? void main() { int t=70,c=14,d; d=t/**//c; printf(%d,d); }
What will be the output of the following C code? void main() { double t=9.0,c=78.50; float Res; Res = (t+c)/8; printf(%.4f, Res); }
What is the return data type of printf() statement?
What error will occur while running the following program? void main() { int i=j+5,j=6; printf(%d %d,i,j); }
What is the correct C language expression for the following mathematical expression? Sin2x + Cos2x + Sin(ex + log10x)
What will be the output of the following C code? void main() { int fact=1,i; clrscr(); for(i=2;i<=8;i++) fact=fact*i; printf(%d,fact); }
void main() { int i,n,sum=0; scanf(“%d”,&n); for(i=0;i<=n;i++) sum=sum+i; printf(“%d”,sum); } The above program is for sum of the numbers from 0 to n. What is the maximum value of n for which the program gives the desired output?
Find out the error in the following program. void main() { int t,c; scanf(Enter the values of t and c = %d %d,&t,&c); printf(t=%d c=%d, t, c); }
Which of the following is a range of long signed int?
What will be the output of the following C code? void main() { int a; char *pr; int Num=288; pr=(char *)&Num; for(a=0;a<2;a++) printf(%d ,*pr++); }
Which of the following programs prints ABCDEFG?
What type of error will occur while running the following program?
void main() { extern int t; t =100; printf(Value of t = %d,t); }
If any signed integer data type takes 4 bytes, what maximum value can be stored?