Loading
Previous Topic Previous slide Next slide Next Topic

A chance to practice and use what you have learned

  • Study Notes
  • Discuss This Topic
    Mathys T.
    ZA
    Mathys T.

    http://codepad.org/m18OODSa

    James J.
    IL
    James J.

    okay

    Nunya B.
    US
    Nunya B.

    #include int main (void) { unsigned short int total = 29; int *ptr = &total; printf("My age when Froggy passed was: %d", *ptr); return = 0; }

    Ole K.
    GT
    Ole K.

    Can someone help me answer this (this program isnt supposed to run right?) int main(void) {int total = 5; int *ptr; *ptr = &total; printf("The value is %d, **ptr); return 0;} cause i tried running it but it was failing.

    Gwyn W.
    GB
    Gwyn W.

    #include void main() { unsigned short int * my_pointer; unsigned short int my_integer = 0; my_pointer = &my_integer; printf ("Address of variable %p ", my_pointer); }

    Randy D.
    US
    Randy D.

    http://codepad.org/LomWGW1n Value Scaling

    Sasi M.
    IN
    Sasi M.

    This course is so good I have learned a lot from it :) Thanks

    Douglas C.
    US
    Douglas C.

    /* 7-5-15 by Douglas Cole */ #include long int goodNum = 130; long int *ptr_num = &goodNum; int main(void) { printf("A good number is %i\n", goodNum); printf("\n"); printf("Using redirection to obtain a good number produces %i\n", *ptr_num); printf("\n"); printf("The good number is located at (using pointer) %p: (using address operator) %p\n", ptr_num, &goodNum); printf("\n"); printf("Curiously the square of good number can be calculated using both value and pointer.\n"); printf("SQUARE = %i\n", (goodNum * *ptr_num)); printf("\n"); printf("Neat trick -> The hexidecimal representation of the good number is %p\n", *ptr_num); return 0; }

    Youssef E.
    MA
    Youssef E.

    This course is so good i have learned a lot from it :) Thanks

    Derald M.
    US
    Derald M.

    #include int main(void) { int total = 5; int * our_pointer; our_pointer = &total; printf("The value is: %d %s %p",total,"at", our_pointer); return 0; }

Notification

You have received a new notification

Click here to view them all