Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.



Question

Passing arrays as parameters

Pass address of [...]

#include <stdio.h>

void foo(int*a)
{
    printf("%p\n", a);  
}
 
int main()
{
    int a[10];
    printf("%p\n", a);  
    foo(a);
}

Answer
first array element

Question

Passing arrays as parameters

Pass address of [...]

#include <stdio.h>

void foo(int*a)
{
    printf("%p\n", a);  
}
 
int main()
{
    int a[10];
    printf("%p\n", a);  
    foo(a);
}

Answer
?

Question

Passing arrays as parameters

Pass address of [...]

#include <stdio.h>

void foo(int*a)
{
    printf("%p\n", a);  
}
 
int main()
{
    int a[10];
    printf("%p\n", a);  
    foo(a);
}

Answer
first array element
If you want to change selection, open original toplevel document below and click on "Move attachment"

Parent (intermediate) annotation

Open it
Passing arrays as parameters Pass address of first array element``` #include <stdio.h> void foo(int*a) { printf("%p\n", a); } int main() { int a[10]; printf("%p\n", a); foo(a); }

Original toplevel document (pdf)

owner: pavestonelaboringuntitled - (no access) - 02 C Programming.pdf, p46

Summary

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Details

No repetitions


Discussion

Do you want to join discussion? Click here to log in or create user.