0% found this document useful (0 votes)
15 views6 pages

C Programming Output Examples

The document contains 8 code snippets in C language with outputs. The code snippets demonstrate various C language concepts - character conversion from integer, pointer manipulation, operator precedence, static variables, scope of variables, preprocessor directives, and bitwise operators.

Uploaded by

Mithra Mithra
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)
15 views6 pages

C Programming Output Examples

The document contains 8 code snippets in C language with outputs. The code snippets demonstrate various C language concepts - character conversion from integer, pointer manipulation, operator precedence, static variables, scope of variables, preprocessor directives, and bitwise operators.

Uploaded by

Mithra Mithra
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

1)

#include<stdio.h>

Void main()

Int x=97;

Char y=x;

Printf(“%c\n”,y);

Output: _____________

2)

#include<stdio.h>

Void main()

Int k=5;

Int *p=&k;

Int **m=&p;

**m=6;

Printf(“%d”,k);

}
Output: ______________________6

3)

#include<stdio.h>

Void main()

Int x=5*9/3+9;

Printf(“%d”,x);

Output: _____________________

4)

#include<stdio.h>

Void addprint()

Static int s=1;

S++;

Printf(“%d”,s);

Void main()
{

addprint();

addprint();

addprint();

Output: ___________________

5)

#include <stdio.h>

int g=100;

int main()

int a;

int b;

b=20;

a=35;

g=65;

printf("%d\n%d\n%d",b,a,g);

}
a=50;

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

return 0;

Output: __________________

6)

#include <stdio.h>

#define MIN 0

#ifdef MIN

#define MAX 10

#endif

int main()

printf("%d\t%d",MAX,MIN);

return 0;

Output: _____________________

7)

#include <stdio.h>
int main()

int i=3;

int l=i/-2;

int k=i%-2;

printf("%d\n%d",l,k);

return 0;

Output: _________________________

8)

#include <stdio.h>

int main()

int p;

int a=1;

int b=0;

int x=10;

int y=5;
p=((x|y)+(a+b));

printf("%d",p);

return 0;

Output: _________________________

You might also like