Passing value from a.out



#include <stdio.h>

int main(int argc, char **argv) {

        printf ("*argv : %s\n", *argv);
        printf ("*++argv :  %s\n", *++argv);
        printf ("*argv : %s \n", *argv);
        printf ("argv[0] : %s \n", argv[0]);
        printf ("**argv : %c \n", **argv);

        return 0;
}                                      


Output : 


$ ./a.out chethan mandya
*argv : ./a.out
*++argv :  chethan
*argv : chethan 
argv[0] : chethan 
**argv : c 

Comments

Popular posts from this blog

RUN JAVA PROJECT IN ANDROID STUDIO

Gradle DSL method not found: 'compile()'

Reverse string using recursion