i want to know why the runtime error is coming in this code?????
#include<stdio.h>
#include<conio.h>
#include<string.h>
int main()
{
char *a,*b;
scanf("%s",a);
printf("%s",a);
return 0;
}
there was no error when a declared first pointer i.e. a but as soon as i declared the 2nd pointer(b) i am getting a runtime error....above code is just an example.... i have a problem in which i want to declare two pointers of undefined length....so i don't want to use malloc....do help me in this matter asap!!!!!