I am trying to write a C program in linux. Here's the code:
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char** argv[])
{
int i;
for(i = 0; i < argc; i++)
{
printf("%s\n", *argv[i]);
}
return 0;
}
gcc
keeps giving me the error segmentation fault (core dumped)
I'm assuming I have to deference *argv[i]
but I don't know. Please help.