home
Learn
screen_rotation
#include <stdio.h> #include <conio.h> void main(){ int a,b; int *p1, **p2, *pp1, **pp2; int s1,s2,s3; clrscr(); printf("\nenter value of a: "); scanf("%d",&a); printf("\nenter value of b: "); scanf("%d",&b); p1 = &a ; p2 = &p1 ; pp1 = &b ; pp2 = &pp1 ; s1 = **p2 + **pp2; s2 = *p1 + **pp2; s3 = s1 + s2; printf("\n value of s1 = %d",s1); printf("\n value of s2 = %d",s2); printf("\n value of s3 = %d",s3); getch(); }
Program Output
enter value of a: 10 enter value of b: 20 value of s1 = 30 value of s2 = 30 value of s3 = 60