Hi guys, I need help with identifying type declaration of variable p.
I've attempted, but I am not certain of my answers.
Can someone help me out please ?
int *vals = [1,3,5,3,5];
p = *vals;
p is of type of third pointer of array of 5 pointer to int ?
char *foo(int x)
foo is a type of pointer to function returing char ?
p is of type char ?
typedef unsigned short u_int16_t;
u_int16_t *val = ...;
p = *val;
val is of type pointer to u_int16_t of type unsigned short ?
p is type pointer to u_int16_t of type unsigned short ?
p = printf("Hello!")
p is of type int; returns the number of characters printed, ?
u_int32_t tf_vaddr; /* coprocessor 0 vaddr register */
u_int32_t tf_status; /* coprocessor 0 status register */
u_int32_t tf_v0; /* Saved register 2 (v0) */
struct trapframe *tf = ...;
tf is a type of pointer to struct trapframe ?
p is of type u_int32_t ?
struct trapframe tf = ...;
p = &tf.tf_v0;
p is of type u_int32_t as well ?
Thank you very much in advance !