Home » C Programming » Functions » Question
  1. Which of the following is the correct output for the program given below?
    #include <stdio.h>
    void function1 (char*) ;
    int main ( )
    {
    char ch[100] ;
    ch[0] = 'A' , ch[1] = 'B' ;
    ch[2] = 'C' , ch[3] = 'D' ;
    function1 ( &ch[0] );
    return 0 ;
    }

    void function1 (char*ch);
    {
    ch++ ;
    printf ("%c" , *ch) ;
    ch++ ;
    printf ("%c\n" , *ch);
    }
    1. AB
    2. BC
    3. CD
    4. No output
Correct Option: B

BC



Your comments will be displayed only after manual approval.