Easy Tutorial
❮ C Function Strcat C Function Freopen ❯

C Exercise Example 77

C Language Classic 100 Examples

Title: Fill-in Exercise (Pointer to Pointer).

Program Analysis: None.

Program Source Code:

Example

//  Created by www.tutorialpro.org on 15/11/9.
//  Copyright © 2015 tutorialpro.org. All rights reserved.
//

#include<stdio.h>
#include<stdlib.h>
int main()
{
    const char *s[]={"man","woman","girl","boy","sister"};
    const char **q;
    int k;
    for(k=0;k&lt;5;k++)
    {
        q=&s[k];       /*Fill in the content here*/
        printf("%s\n",*q);
    }
    return 0;
}

The output result of the above example is:

man
woman
girl
boy
sister

C Language Classic 100 Examples

❮ C Function Strcat C Function Freopen ❯