C printf() issue

Apr 25, 2013 at 5:44am
The following code crashes the process. Does anyone know why?
1
2
3
4
5
6
#include <stdio.h>

int main(int argc, char* argv)
{
	printf("%s", argv[0]);
}
Apr 25, 2013 at 5:50am
The type of argv is wrong, for starters.
Apr 25, 2013 at 5:54am
Thanks. Stupid mistake... :) Some rest is in order.
Topic archived. No new replies allowed.