C | Pointer Basics | Question 17

filter_none

edit
close

play_arrow

link
brightness_4
code

#include <stdio.h>
void f(char**);
int main()
{
    char *argv[] = { "ab", "cd", "ef", "gh", "ij", "kl" };
    f(argv);
    return 0;
}
void f(char **p)
{
    char *t;
    t = (p += sizeof(int))[-1];
    printf("%s\n", t);
}

chevron_right


(A) ab
(B) cd
(C) ef
(D) gh


Answer: (D)

Explanation:

Quiz of this Question



My Personal Notes arrow_drop_up


Article Tags :
Practice Tags :


3


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.