Advertisement
cd62131

print argv

Jan 27th, 2019
497
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.26 KB | None | 0 0
  1. #include <stdio.h>
  2. int main(int argc, const char **argv) {
  3.   printf("argc = %d\n", argc);
  4.   printf("argv = %p\n", argv);
  5.   for (const char **p = argv; p < argv + argc; ++p) {
  6.     printf("argv = %p, *argv = %p -> \"%s\", **argv = '%c'\n", p, *p, *p, **p);
  7.   }
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement