Problem 56. C Program to accept two numbers and print the sum of given two numbers by using pointers.
#include<stdio.h>
#include<conio.h>
main( )
{
int a, b,c;
clrscr( );
a=10;
b=20;
c=*(&a)+*(&b);
printf(“%d”,c);
getch( );
}
C compiler: gcc 4.1.2
Back to main directory: Sample C Program | Software Practical | Solved C Assignment#include<stdio.h>
#include<conio.h>
main( )
{
int a, b,c;
clrscr( );
a=10;
b=20;
c=*(&a)+*(&b);
printf(“%d”,c);
getch( );
}
C compiler: gcc 4.1.2