0% found this document useful (0 votes)
30 views

C Lab Assignment 2

The document contains 10 C programming lab assignments involving basic operators, data types, and input/output functions. Each assignment prints the result of an expression to the console using printf. The expressions test logical, relational, arithmetic, increment/decrement, and bitwise operators on variables of types int, char, and long int.

Uploaded by

Deep Raj Jangid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

C Lab Assignment 2

The document contains 10 C programming lab assignments involving basic operators, data types, and input/output functions. Each assignment prints the result of an expression to the console using printf. The expressions test logical, relational, arithmetic, increment/decrement, and bitwise operators on variables of types int, char, and long int.

Uploaded by

Deep Raj Jangid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

C-PROGRAMING LAB ASSIGNMENTS

Assignment2

return 0;
}

1. #include<stdio.h>
int main(){

6. #include<stdio.h>

int a;

int main(){

a=printf("hello %d", printf(hi

char a=250;

sunday));

int expr;

printf(%d,a);

expr= a+ !a + ~a + ++a;

return 0;

printf("%d",expr);

return 0;
}

2. #include<stdio.h>
int main(){

7. int b;

int num,a=10;

#include<stdio.h>

num=a++ + +++a;

int main(){

printf("%d %d",num,a);

clrscr();

return 0;

int a=5;

printf("Alien=%#X Number is
%d", a++, a++ + ++b);

3. #include<stdio.h>
int main(){

return 0;
}

int z;
z=(65,23,66);

8. #include<stdio.h>

printf("%#c",z);

int main(){

return 0;

int scanf=5;

printf("%d",scanf);
return 0;

4. #include<stdio.h>

int main(){
int i;

9. #include<stdio.h>

i=printf("%d", printf(\new \bike

int main(){

));

int _=5;

return 0;

int __=10;

int ___;
___=_+__;

5. #include<stdio.h>

printf("%i",___);

int main(){

return 0;

const int p;

p=10;
printf("%d",p);

WSCUBETechPvt.Ltd.
BhaskarCircle,Ratanada,Jodhpur
Contact:7742557176

C-PROGRAMING LAB ASSIGNMENTS


10. #include<stdio.h>

15. #include<stdio.h>

int main(){

int main(){

long int a= 65536;

int a=2;

printf("%d",(~a)++);

a=a++ + ~++a;

return 0;

printf("\\\%d",a);

return 0;
}

11. #include<stdio.h>
int main(){
const int __SMALL__ = 11;
int y;
y= __SMALL__ < 5;
printf("%d",y>>2);
return 0;
}
12. #include<stdio.h>
int xyz=23,a;
int main(){
int xyz=20;
{ int xyz;
printf("%d %d",xyz,a);
return 0;
}
13. #include<stdio.h>
int main(){
int x;
printf("%d",++x +!(x++) + ~x );
return 0;
}
14. #include<stdio.h>
int main(){
int a=10;
printf("false %d",a>~(!a));
return 0;
}

WSCUBETechPvt.Ltd.
BhaskarCircle,Ratanada,Jodhpur
Contact:7742557176

You might also like