Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
C
Assign integer value to pointer?
Aman Shaw
Programming language:
C
2021-03-25 17:32:14
1
Q:
Assign integer value to pointer?
whitezo
Code:
C
2021-04-15 04:10:31
int main(){ int variable; int *ptr = &variable; *ptr = 20; printf("%d", *ptr); return 0; }
0
Tags
value
int
sign
Related
pass the pointer in C
Write a C program to do the following: (10 marks) a. Declare two variables a and b of type integer b. Initialise the value of variable a to 3 and the value of variable b to 0 c. If the value of a is greater than 0, then assign b the value of a + 3
accessing elements of 1d array using pointers
pointer parameter where to put the asterix in C?
how to use a pointer as a parameter in c
New to Communities?
Join the community