100%(2)2 out of 2 people found this document helpful
This preview shows page 1 - 2 out of 4 pages.
CS211: Homework Problem Set 1SOLUTIONSQuestion 1:Given the following declarations:char c = ’A’;char * p = &c;char ** p2 = &p;void * v = &p2;Examine each of the following expressions. If the expression is illegal, write ILLEGAL. If the expression is legal, write its type (i.e. int ** or unsigned long\ etc):Question 2:There is an old C programmer’s joke which goes as follows:Two strings walk into a bar. The first one says“Hi I’d like a beer.A2%asd$ASDlk2;3423Ammm.234ASDfmmlASDFLJ:#@$”The second says“You’ll have to pardon my friend, he’s not null terminated.”Explain the joke.