Loading
Precedente Previous slide Next slide Successivo

Utilizzando un puntatore direttamente manipolare i dati in memoria in C

  • Note di Apprendimento
  • Revisione degli argomenti
    Arun S.
    IN
    Arun S.

    instead of printing the first letter(%c) what if i try to print the whole string using( %s)

    Arun S.
    IN
    Arun S.

    can i assign any " STRING LITERAL " to a " CHAR POINTER " ex: char *string; string = "Hello TRAINER";

    Amith B.
    IN
    Amith B.

    char words[6] = "Earth"; char *ptr_words = words; *ptr_words = "E"; ptr_words = ptr_words + 1; *ptr_words = "A"; ptr_words = ptr_words + 1; *ptr_words = "R"; ptr_words = ptr_words + 1; *ptr_words = "T"; ptr_words = ptr_words +1; *ptr_words = "H"; printf("the new word is %s \n", words); What's wrong with the above coding? I'm getting error

    Dilawar H.
    PK
    Dilawar H.

    pointer to directly manipulate data in memory.

Notification

You have received a new notification

Click here to view them all