Pass string to a function


Levels of difficulty: / perform operation:


Program

#include <stdio.h>
int main ( )
{
    char s1[6] = "Ankit Kumar Singh";
    print_str(s1);
}

int print_str(char s1[]) {
    printf("%s \n", s1);
}


Result

Ankit Kumar Singh





Quantitative Aptitude
Reasoning
Programming
Interview