Study Material
Study Material
1) Main()
{
int i=10;
If(z=!(i>14))
Printf(“%d”,z);
}
2) static const int i=10;
main()
{
static int i=20;
printf(“%d”,i);
}
Technical round:
1)Print
**
***
****
*****
3) if(?)
Printf(“Hello”);
Else
Printf(“world”);
o/p: HELLOWORLD
1) Is it possible
2) If possible write condition
4)Main()
Float a=5;
Switch(a)
Case 1:printf(“hi”);
Case 5:printf(“hello”);
5)WAP to set 5th bit in a byte but don’t disturb the lower nibble part.
6)structure padding
10)Arrays,pointers,files
12)compilation process
13)CAN protocol
18)main()
Int a=10;b=20;
Func(a,b);
Printf(“%d %d”,a,b);
}
Func(int x, int y)
X=20;y=30;
o/p:x=?,y=?
19)main()
Int a=10;b=20;
Func(&a,&b);
Printf(“%d %d”,a,b);
X=20;y=30;
o/p:x=?,y=?
20)int x=0x12345678
21)Take 3 variables as x,y,z how do you know that whether 3 varaibles are equal or not?
23)
struct xyz
Char
Int
Float
Double
Short int
Int
AVIN SYSTEM
1. main()
{
printf(“%x”,-1<<3);
}
2. struct employe
{
};
main(){
struct employes[10];
printf("%d",sizeof(s));
}
3. struct employe{
int day;
char name[];
int a;
int b;
}ss,ss2,ss1[10];
4. main(){
int n=5;
printf("%d",n--);
if(n)
main();
}
5. main()
{
printf("%c",10[AUTOMOTIVE]);
}
6. main()
{
char a=0x12345678;
char *ptr,ptr=&a;
printf("%x",*ptr++);
}
7. main()
{
int i=1;
switch(i);
{
printf("AVIN");
case 1:printf("AVIN");
case 2:printf("system");
break;
}
}
8. #define static_value 10
main()
{
static int x=10.01;
if(x==static_value)
printf("equal");
else if (x>10)
printf("not eql");
else
printf("not equal");
}
9. main(){
int i,j,k,l,m;
i=-1;j=-1;k=0;l=2;
m=i++&&j++&&k++||l++;
printf("%d%d%d%d%d",i,j,k,l,m);
}
10. main()
{
char str[]="WIN";
char* s=str;
for(i=1;str[i];i++)
{
printf("%c%c%c",s[i],*(s+i),i[s]);
}
}
11. main(){
int i=0,k=0;z=0;
z=++i||++k||z++;
printf("%d%d%",i,k,z);
}
-----------------------------------------------
12. main()
{
printf(“%x”,-1<<3);
}
13. struct employe
{
};
main(){
struct employes[10];
printf("%d",sizeof(s));
}
15. main(){
int n=5;
printf("%d",n--);
if(n)
main();
}
16. main()
{
printf("%c",10[AUTOMOTIVE]);
}
17. main()
{
char a=0x12345678;
char *ptr,ptr=&a; //Redeclaration of pointer hence Error
printf("%x",*ptr++);
}
18. main()
{
int i=1;
switch(i);
{
printf("AVIN");
case 1:printf("AVIN");
case 2:printf("system");
break;
}
}
19. #define static_value 10
main()
{
static int x=10.01;
if(x==static_value)
printf("equal");
else if (x>10)
printf("not eql");
else
printf("not equal");
}
20. main(){
int i,j,k,l,m;
i=-1;j=-1;k=0;l=2;
m=i++&&j++&&k++||l++;
printf("%d%d%d%d%d",i,j,k,l,m);
}
21. main()
{
char str[]="WIN";
char* s=str;
for(i=1;str[i];i++)
{
printf("%c%c%c",s[i],*(s+i),i[s]);
}
}
22. main(){
int i=0,k=0;z=0;
z=++i||++k||z++;
printf("%d%d%",i,k,z);
}
23. Main()
{
int i=10;
If(z=!(i>14))
Printf(“%d”,z);
}
24. static const int i=10;
main()
{
Static int i=20;
Printf(“%d”,i);
}
Technical round:
1. Print
*
**
***
****
*****
2. Addition of two numbers without using Arithmetic operators
3. if(?)
Printf(“Hello”);
Else
Printf(“world”);
o/p: HELLOWORLD
3) Is it possible
4) If possible write condition
4. main()
{
Float a=5;
Switch(a)
{
Case 1:printf(“hi”);
Case 5:printf(“hello”);
}
5. WAP to set 5th bit in a byte but don’t disturb the lower nibble part.
6. structure padding
7. Differences b/w structure and union with an example
8. About projects in detail
9. storage classes in detail
10. Arrays,pointers,files
11. similar program in written test
12. compilation process
13. CAN protocol
14. Error frame in CAN
15. Interrupt Service Routine in 8051
16. operators in c explain in detail
17. list of data types with corresponding ranges
18. main()
{
Int a=10;b=20;
Func(a,b);
Printf(“%d %d”,a,b);
}
Func(int x, int y)
{
X=20;y=30;
}
o/p:x=?,y=?
19. main()
{
Int a=10;b=20;
Func(&a,&b);
Printf(“%d %d”,a,b);
}
Func(int *x, int *y)
{
X=20;y=30;
}
o/p:x=?,y=?
20. int x=0x12345678
If it is big endian what is the value of x?
If it is little endian what is the value of x?
21. Take 3 variables as x,y,z how do you know that whether 3 varaibles are equal or not?
22. greatest of three numbers
23. struct xyz
{
Char
Int
Float
Double
Short int
Int
}
What is the size of the structure?