291 views
0 votes
0 votes

#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);

}

unable to understand the line   t = (p += sizeof(int))[-1];

please explain..

1 Answer

Related questions

686
views
0 answers
0 votes
shiva0 asked Jan 11, 2019
686 views
#include int main() { int i = 1; printf("%d %d %d\n", i++, i++, i); return 0; }
1.0k
views
0 answers
0 votes
ayush201 asked Dec 30, 2018
1,004 views
A weight-balanced tree is a binary tree in which for each node. The number of nodes in the left sub tree is at least half and at most twice the number of nodes ... is best described by which of the following?a) b) c) d) Binary Trees
599
views
0 answers
0 votes
Kritika14 asked Dec 27, 2018
599 views
What does the following function do? int fun(unsigned int n) { if (n == 0 || n == 1) return n; if (n%3 != 0) return 0; return fun(n/3); } ... n is multiple of 3, otherwise returns 1Returns 0 when n is the power of 3, otherwise returns 1
7.5k
views
1 answers
1 votes
Piyush mishra asked Dec 7, 2018
7,468 views
#include<stdio.h> int main() { int a[]={1,2,3,4,5,6}; int *ptr=(int *)(&a+1); printf("%d",*(ptr-1)); return 0; }this program print => 6 but if we ... (&a+2); printf("%d",*(ptr-2)); return 0; }justify why this program not print => 6