SlideShare a Scribd company logo
What will be the output for the following C code
1)#include <stdio.h>
int main()
{
int a;
a=015+0x71+5;
printf("%dn", a);
}
What will be the output for the following C code
2)#include <stdio.h>
int main()
{
printf(“%d”,4%3);
Printf(“%d”,-4%3);
Printf(“%d”,4%-3);
printf(“%d”,-4%-3);
}
What will be the output for the following C code
3) #include<stdio.h>
int main()
{
int a = 10, b = 5, c = 5;
int d;
d = b + c == a;
printf("%d", d);
}
What will be the output for the following C code
4)#include <stdio.h>
int main()
{
int x=12,y=7,z;
z=x!=4||y==2;
Printf(“%d”,z);
}
What will be output of the following c code
5)#include<stdio.h>
Void main() {
int i=4,j=-1,k=0,w,x,y,z;
w=i||j||k;
x=i&&j&&k;
y=i||j&&k;
z=i&&j||k;
printf("n w=%d X=%d y=%d z=%d",w,x,y,z);
}
What will be output of the following c code
6) #include<stdio.h>
Void main()
{
Int a,b=20,c;
a=10,20,30;
c=a+b;
Printf(“%d”,c);
}
What will be output of the following c code
7) #include<stdio.h>
Void main()
{
Int a,b=20,c;
a=(10,20,30);
c=a+b;
Printf(“%d”,c);
}
What will be output of the following c code
8) #include<stdio.h>
Void main()
{
Int a=10,20,30,b=20,c;
c=a+b;
Printf(“%d”,c);
}
What will be the output for the following C code
9) #include <stdio.h>
int main()
{
int a = 1, b = 2;
a += b -= a;
printf("%d %d", a, b);
}
What will be the output for the following C code
10) #include <stdio.h>
int main()
{
int a = 1, b = 2,c=3,d=4;
a += b -= c*=d;
printf("%d %d%d%d", a, b,c,d);
}
What will be the output for the following C code
11) #include <stdio.h>
void main()
{
int i=-3,j=2,k=0,m;
m=++i&&++j&&++k;
printf(“%d%d%d%d”,i,j,k,m);
}
What will be the output for the following C code
12) #include <stdio.h>
void main()
{
int i=-3,j=2,k=0,m;
m=++i||++j||++k;
printf(“%d%d%d%d”,i,j,k,m);
}
What will be the output for the following C code
13) #include <stdio.h>
void main()
{
int i=-3,j=2,k=0,m;
m=++i&&++j||++k;
printf(“%d%d%d%d”,i,j,k,m);
}
What will be the output for the following C code
14) #include <stdio.h>
void main()
{
int a=2;
a=a++ + ~++a;
Printf(“%d”,a);
}
What will be output of the following c code
15)#include<stdio.h>
Int main(){
Int k,n=30;
K=(n>5?(n<=10?100:200):500);
Printf(“%d”,k);
Return 0;
}
What will be the output for the following C code
16) #include <stdio.h>
void main()
{
int a;
a=(1?2?3:4:5);
printf(“%d”,a);
}
What will be the output for the following C code
17)#include <stdio.h>
int main()
{
int a = 10;
a = ~a;
printf("%dn", a);
}
What will be the output for the following C code
18) #include<stdio.h>
void main()
{
int i=32, j=0x20, k, l, m;
k=i|j;
l=i&j;
m=k^l;
printf("%d, %d, %d, %d, %dn", i, j, k, l, m);
}
What will be the output for the following C code
19) #include<stdio.h>
void main()
{
int x = 0, y = 2, z = 3;
int a = x & y | z;
printf("%d", a);
}
What will be the output for the following C code
20)#include <stdio.h>
void main()
{
int x = 97;
int y = sizeof(x++);
printf("x is %d", x);
}

More Related Content

PPTX
Technical quiz 5#.pptx
PPT
C programs pbq final
DOCX
Programming fundamentals
DOCX
C Programming
PPTX
UNIT 2 LOOP CONTROL.pptx
DOCX
Best C Programming Solution
PPT
pointer.ppt hfkogfhkigfvjjgdsyhhgfdfghjb
PPT
pointer.ppt hfkogfhkigfvjjgdsyhhgfdfghjb
Technical quiz 5#.pptx
C programs pbq final
Programming fundamentals
C Programming
UNIT 2 LOOP CONTROL.pptx
Best C Programming Solution
pointer.ppt hfkogfhkigfvjjgdsyhhgfdfghjb
pointer.ppt hfkogfhkigfvjjgdsyhhgfdfghjb

Similar to operators in c language programming to improve c skills (20)

DOC
'C' language notes (a.p)
PDF
C++ Programming - 1st Study
PDF
C questions
PDF
C Programming Example
PPTX
Program presentation
DOCX
Include
DOCX
Chapter 8 c solution
PDF
Pattern printing-in-c(Jaydip Kikani)
DOCX
Qust & ans inc
PDF
Computer P-Lab-Manual acc to syllabus.pdf
PPT
operators.ppt
PDF
LET US C (5th EDITION) CHAPTER 2 ANSWERS
DOCX
Itp practical file_1-year
PDF
C lab programs
PDF
C lab programs
DOCX
Practical write a c program to reverse a given number
DOCX
Practical write a c program to reverse a given number
PDF
pattern-printing-in-c.pdf
PDF
PPTX
C language
'C' language notes (a.p)
C++ Programming - 1st Study
C questions
C Programming Example
Program presentation
Include
Chapter 8 c solution
Pattern printing-in-c(Jaydip Kikani)
Qust & ans inc
Computer P-Lab-Manual acc to syllabus.pdf
operators.ppt
LET US C (5th EDITION) CHAPTER 2 ANSWERS
Itp practical file_1-year
C lab programs
C lab programs
Practical write a c program to reverse a given number
Practical write a c program to reverse a given number
pattern-printing-in-c.pdf
C language
Ad

Recently uploaded (20)

PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Sports Quiz easy sports quiz sports quiz
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Insiders guide to clinical Medicine.pdf
PPTX
Cell Types and Its function , kingdom of life
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Pre independence Education in Inndia.pdf
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Microbial diseases, their pathogenesis and prophylaxis
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Sports Quiz easy sports quiz sports quiz
TR - Agricultural Crops Production NC III.pdf
VCE English Exam - Section C Student Revision Booklet
Insiders guide to clinical Medicine.pdf
Cell Types and Its function , kingdom of life
Final Presentation General Medicine 03-08-2024.pptx
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Abdominal Access Techniques with Prof. Dr. R K Mishra
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
O7-L3 Supply Chain Operations - ICLT Program
Pre independence Education in Inndia.pdf
Ad

operators in c language programming to improve c skills

  • 1. What will be the output for the following C code 1)#include <stdio.h> int main() { int a; a=015+0x71+5; printf("%dn", a); }
  • 2. What will be the output for the following C code 2)#include <stdio.h> int main() { printf(“%d”,4%3); Printf(“%d”,-4%3); Printf(“%d”,4%-3); printf(“%d”,-4%-3); }
  • 3. What will be the output for the following C code 3) #include<stdio.h> int main() { int a = 10, b = 5, c = 5; int d; d = b + c == a; printf("%d", d); }
  • 4. What will be the output for the following C code 4)#include <stdio.h> int main() { int x=12,y=7,z; z=x!=4||y==2; Printf(“%d”,z); }
  • 5. What will be output of the following c code 5)#include<stdio.h> Void main() { int i=4,j=-1,k=0,w,x,y,z; w=i||j||k; x=i&&j&&k; y=i||j&&k; z=i&&j||k; printf("n w=%d X=%d y=%d z=%d",w,x,y,z); }
  • 6. What will be output of the following c code 6) #include<stdio.h> Void main() { Int a,b=20,c; a=10,20,30; c=a+b; Printf(“%d”,c); }
  • 7. What will be output of the following c code 7) #include<stdio.h> Void main() { Int a,b=20,c; a=(10,20,30); c=a+b; Printf(“%d”,c); }
  • 8. What will be output of the following c code 8) #include<stdio.h> Void main() { Int a=10,20,30,b=20,c; c=a+b; Printf(“%d”,c); }
  • 9. What will be the output for the following C code 9) #include <stdio.h> int main() { int a = 1, b = 2; a += b -= a; printf("%d %d", a, b); }
  • 10. What will be the output for the following C code 10) #include <stdio.h> int main() { int a = 1, b = 2,c=3,d=4; a += b -= c*=d; printf("%d %d%d%d", a, b,c,d); }
  • 11. What will be the output for the following C code 11) #include <stdio.h> void main() { int i=-3,j=2,k=0,m; m=++i&&++j&&++k; printf(“%d%d%d%d”,i,j,k,m); }
  • 12. What will be the output for the following C code 12) #include <stdio.h> void main() { int i=-3,j=2,k=0,m; m=++i||++j||++k; printf(“%d%d%d%d”,i,j,k,m); }
  • 13. What will be the output for the following C code 13) #include <stdio.h> void main() { int i=-3,j=2,k=0,m; m=++i&&++j||++k; printf(“%d%d%d%d”,i,j,k,m); }
  • 14. What will be the output for the following C code 14) #include <stdio.h> void main() { int a=2; a=a++ + ~++a; Printf(“%d”,a); }
  • 15. What will be output of the following c code 15)#include<stdio.h> Int main(){ Int k,n=30; K=(n>5?(n<=10?100:200):500); Printf(“%d”,k); Return 0; }
  • 16. What will be the output for the following C code 16) #include <stdio.h> void main() { int a; a=(1?2?3:4:5); printf(“%d”,a); }
  • 17. What will be the output for the following C code 17)#include <stdio.h> int main() { int a = 10; a = ~a; printf("%dn", a); }
  • 18. What will be the output for the following C code 18) #include<stdio.h> void main() { int i=32, j=0x20, k, l, m; k=i|j; l=i&j; m=k^l; printf("%d, %d, %d, %d, %dn", i, j, k, l, m); }
  • 19. What will be the output for the following C code 19) #include<stdio.h> void main() { int x = 0, y = 2, z = 3; int a = x & y | z; printf("%d", a); }
  • 20. What will be the output for the following C code 20)#include <stdio.h> void main() { int x = 97; int y = sizeof(x++); printf("x is %d", x); }