Facebook
From DW, 1 Year ago, written in Plain Text.
This paste is a reply to Re: CSE 2.1 CL2 from CL4 - view diff
Embed
Download Paste or View Raw
Hits: 513
  1. #include<stdio.h>
  2.  int main()
  3.  {
  4.  
  5.      /*int x;
  6.  
  7.      scanf("%d", &x);
  8.      printf("Address of x is %dn",&x); //%x location of x in hexadecimal
  9.  
  10.  
  11.      p = &x;
  12.  
  13.      printf("Address of p is %dn",p);
  14.  
  15.      *p=0;
  16.  
  17.      printf("Value of x is %dn",*p);
  18.  
  19.      printf("Value of x is %dn",x);
  20.  
  21.      printf("Address of p is %dn",&p);
  22.      int y=10;
  23.  
  24.      p=&y;
  25.  
  26.      *p=3;
  27.  
  28.      printf("Address of p is %dn",p);
  29.     printf("Value of p is %dn",*p);
  30.     printf("Value of y is %dn",y);
  31.     printf("Address of y is %dn",&p);
  32.  
  33.      int a[5], i;
  34.      for(i=0; i<=4;i++)
  35.         {
  36.             scanf("%d",arr+i);
  37.         }
  38.  
  39.  
  40.         /*for(int i=0;i<5;i++)
  41.         {
  42.             printf("%dn",*arr+i);
  43.         }
  44.         */
  45.         for(int i=0;i<=4;i++)
  46.         {
  47.             p= arr[4-i];
  48.             printf("%dn",p);
  49.  
  50.         }
  51.  }
  52.  
  53.