Showing posts with label strlen. Show all posts
Showing posts with label strlen. Show all posts

Saturday, 4 February 2012

Frequently Asked Questions in Technical Round at MNCs like TCS, WIPRO, INFOSYS,..etc – 7

Predict the output or error(s) for the following:


1)

main ( )

{

 static char *s[ ]  = {“black”, “white”, “yellow”, “violet”};


 char **ptr[ ] = {s+3, s+2, s+1, s}, ***p;


 p = ptr;


 **++p;


 printf(“%s”,*--*++p + 3);


}

Answer:

ck


Explanation: