move exercises, lecture examples, labs into subfolders
This commit is contained in:
24
Exercises/C13/assigning_pointers.c
Normal file
24
Exercises/C13/assigning_pointers.c
Normal file
@@ -0,0 +1,24 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main (void )
|
||||
{
|
||||
// Integer variables
|
||||
int a, ValueB, d;
|
||||
|
||||
// integer pointers
|
||||
int *ptrA=&a, *B=&ValueB, *Data=&d;
|
||||
|
||||
// Float variables
|
||||
float f,y,z;
|
||||
|
||||
// Float pointers
|
||||
float *pf=&f , *q=&y, *Zvalue=&z;
|
||||
|
||||
// We could also do this on separate lines e.g.
|
||||
int SomeData;
|
||||
int *Another;
|
||||
Another = &SomeData;
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user