![]()
Practice Control Instructions – Predict the output of following “C” code:
void main()
{
if(printf("O", printf("Two")))
printf("Face");
else
printf("Focus");
} ![]()
Practice Control Instructions – Predict the output of following “C” code:
void main()
{
if(printf("O", printf("Two")))
printf("Face");
else
printf("Focus");
} ![]()
Practice Expressions – What will be output of the following “c” code?
#include
int main(){
int num,a=15;
num=- - - -a--;
printf("%d %d",num,a);
return 0;
} ![]()
Practice Arrays – What will be output of the following “c” code?
#include
int main(){
int arr[]={6,12,18,24};
int x=0;
x=arr[1]+(arr[1]=2);
printf("%d",x); return 0;
} ![]()
Practice Declarations and Initializations – Predict the output of following code:
void main()
{
float a=1.1;
double b=1.1;
if(a==b)
printf("equal");
else
printf("not equal");
} ![]()
Practice Basic Concept – All keywords in C are in
![]()
Practice Basic Concept – What will be output of the following “c” code?
#include
int main(){
printf("%d","abcde"-"abcde");
return 0;
} ![]()
Practice Input / Output – Which is true about fputs returns?
![]()
Practice Pointers – What will be output of the following “c” code?
#include
int main(){
int i;
static double *p,*q,*r,*s,t=5.0;
double **arr[]={&p,&q,&r,&s};
*p=*q=*r=*s=t;
for(i=0;i<4;i++)
printf("%.0f ",**arr[i]);
return 0;
} ![]()
Practice Pointers – int **ptr; is?
![]()
Practice Expressions – What will be output of the following “c” code?
#include
int main(){
int x,a=3;
x=+ +a+ + +a+ + +5;
printf("%d %d",x,a);
return 0;
} ![]()
Practice Variable Number of Arguments – Which of the following is a collection of different data types?
![]()
Practice Declarations and Initializations – What is the output of this C code?
#include
int main()
{
short int i;
scanf("%hd", &i);
printf("%hd", i); return 0;
} ![]()
Practice Control Instructions – What will be output of the following “c” code?
#include
int main() {
int i;
for(i=0;i<5;i++){
int i=10;
printf(" %d",i);
i++;
}
return 0;
} ![]()
Practice Structures, Unions, Enums – What is the output of this C code?
#include
typedef struct p *q;
struct p
{
int x; char y; q ptr;
};
int main()
{
struct p p = {1, 2, &p};
printf("%d
", p.ptr->ptr->x);
return 0;
}