Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

pointer in C

#include<stdio.h>
#include<stdlib.h>
main()
{
    int *p;
    p=(int*)calloc(3*sizeof(int));
    printf("Enter first number
");
    scanf("%d",p);
    printf("Enter second number
");
    scanf("%d",p+2);
    printf("%d%d",*p,*(p+2));
    free(p);
}
Source by www.sanfoundry.com #
 
PREVIOUS NEXT
Tagged: #pointer #C
ADD COMMENT
Topic
Name
8+3 =