What is the output of the following C Program?
![]()
Practice Basic Concept – What is the output of the following C Program?
#include
void main()
{
clrscr();
}
clrscr(); ![]()
Practice Basic Concept – What is the output of the following C Program?
#include
void main()
{
clrscr();
}
clrscr(); ![]()
Practice Pointers – What is the output of the following C Program?
#include
void main()
{
char far *farther,*farthest;
printf("%d %d",sizeof(farther),sizeof(farthest));
} ![]()
Practice C Preprocessor – What will be output of the following “c” code?
#include
#define clrscr() 100
main()
{
clrscr();
printf("%d
",clrscr());
} ![]()
Practice Expressions – What will be output of the following “c” code?
#include
long fu(int);
char vect[]={1,2,3,4,5};
void main(){
int i=1;
i=fu(++i)+ ++vect[++i]+ ++i+fu(i++);
printf(“%d”,i);
}
long fu(int x){
return x*3;
}
![]()
Practice Pointers – What is the value of u1 and u2.
void main()
{
int u1, u2
int v=3
int *pv;
u1=2*(v+5);
pv=&v;
u2=2*(*pv + 5);
printf("u1=%d, u2=%d", u1, u2);
} ![]()
Practice Variable Number of Arguments – What will be output of the following “c” code?
Note: 32 bit compiler
#include
int main(){
float **(*ptr)[4]=(float **(*)[4])0;
ptr+=5;
printf("%d %d",ptr,sizeof ptr);
return 0;
} ![]()
Practice Functions – What is the following summation fuction doing?
void summation (n)
int n;
{
int i; sum = 0;
i = 1;
for(i = 1; i < = n; i++)
sum+= i;
} ![]()
Practice Structures, Unions, Enums – Consider the following declaration
struct list {
int x;
struct list *next;
)*head;
The statement head.x = 100
![]()
Practice Pointers – Prior to using a pointer variable it should be
![]()
Practice Pointers – What is the output of the following C Program?
#include
void main()
{
char *p;
printf("%d %d ",sizeof(*p),sizeof(p));
} ![]()
Practice Pointers – The following C program fragment
void main()
{
int *a;
*a= 7;
} ![]()
Practice Expressions – What will be output of the following “c” code?
#include
#define plus +
#define minus +plus
int main(){
long x,i=3;
x=++i;
printf("%ld",x);
return 0;
} ![]()
Practice Library Functions – what will be the output of following C program.
void main()
{
sum=0
for (i=100 , i<0 , i++)
sum += abs(i);
printf("%d", sum)
} ![]()
Practice Expressions – What will be output of the following “c” code?
#include
void main(){
int num,a=10;
num=a--- -a--;
printf("%d %d",num,a);
} ![]()
Practice Control Instructions – Consider a part of a loop as shown below.
for (i = 0; i < = 10000; i++)
{
:
:
if (error < 0.005)
break;
}
The above loop will?