Consider the following declaration
enum color {black= -1,
![]()
Practice Structures, Unions, Enums – Consider the following declaration
enum color {black= -1, blue, green};
This represents
![]()
Practice Structures, Unions, Enums – Consider the following declaration
enum color {black= -1, blue, green};
This represents
![]()
Practice Structures, Unions, Enums – Most appropriate sentence to describe unions is
![]()
Practice Basic Concept – What will be the output of the below C program.
#include
int main(){
int a= 0;
int b = 20;
char x =1;
char y =10;
if(a,b,x,y)
printf("hello");
return 0;
} ![]()
Practice Structures, Unions, Enums – The below declaration
union id {
char color [12];
int size;
} tshirt, pant;
denotes shirt and pant are variable of type id and
![]()
Practice Bitwise Operators – The expression a << 6 shifts all bits of a six places to the left.If a 0x6db7, what is the value of a << 6?
![]()
Practice Bitwise Operators – If a = 0x6db7 and b = 0xa726, what is the value of a a^b?
![]()
Practice Functions – What will be the output of the following program.
#include
int AX = 0;
int main()
{
int i=0;
i = abc();
printf("%d",i);
return 0;
}
abc()
{
AX = 1000;
return AX;
} ![]()
Practice Input / Output – The expression ((fpt = fopen (“Samples”, “w”)) == NULL) would be true if
![]()
Practice Input / Output – The function fopen (“filename”,”r”) returns
![]()
Practice Arrays – lf S is an array of 80 characters, then the value assigned to S through the statement scanf(“%s” ,S) with input 12345 would be
![]()
Practice Variable Number of Arguments – What will be output of the following “c” code?
#include
int main(){
float x;
x=(int)5.6 * 3.2/sizeof((int)6.6);
printf("%f",x);
return 0;
} ![]()
Practice Pointers – What is the output of the following C Program?
#include
void main()
{
int *j;
{
int i=10;
j=&i;
}
printf("%d",*j);
} ![]()
Practice Basic Concept – What is the output of the following C Program?
#include
void main()
{
int y;
scanf("%d",&y); // Given Input is 2000
if( (y%4==0 && y%100 != 0) || y%100 == 0 )
printf("%d is a leap year");
else
printf("%d is not a leap year");
} ![]()
Practice Basic Concept – What is the output of the following C Program?
#include
void main()
{
char not;
not=!2;
printf("%d",not);
} ![]()
Practice Declarations and Initializations – In case of ordinary int variables