poiner in c
int* pc, c, d;
c = 5;
d = -15;
pc = &c; printf("%d", *pc); // Output: 5
pc = &d; printf("%d", *pc); // Ouptut: -15
poiner in c
int* pc, c, d;
c = 5;
d = -15;
pc = &c; printf("%d", *pc); // Output: 5
pc = &d; printf("%d", *pc); // Ouptut: -15
poiner in c
#include <stdio.h>
int main()
{
int var =10;
int *p;
p= &var;
printf ( "Address of var is: %p", &var);
printf ( "\nAddress of var is: %p", p);
printf ( "\nValue of var is: %d", var);
printf ( "\nValue of var is: %d", *p);
printf ( "\nValue of var is: %d", *( &var));
/* Note I have used %p for p's value as it represents an address*/
printf( "\nValue of pointer p is: %p", p);
printf ( "\nAddress of pointer p is: %p", &p);
return 0;
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us