MCQOPTIONS
Saved Bookmarks
| 1. |
Which of the following is the correct output for the ‘C’ program given below:#includevoid afun(char *) ;int main( ) {char ch[10] ;ch[0] = 'X' ; ch[1] = 'Y' ; ch[2] = 'Z' ;ch[3] = 'Z' ;afun (& ch[0]) ;return 0 ;}void afun (char *c){c++ ;printf("%c", *c) ;c++ ;printf("%c\n", *c) ;}Correct output is: |
| A. | XY |
| B. | YZ |
| C. | ZW |
| D. | None of the above |
| Answer» C. ZW | |