this code works fine...Code:#include<stdio.h> #include<stdlib.h> int main(void) { char sentence[256]; printf("\nEnter the sentence : "); fgets(sentence,255,stdin); fputs(sentence,stdout); }
but when i tried with pointers,say
it isnt working...don think my question as silly...i am new to c and pointers...help me plz..Code:char *sentence; printf("\nEnter the sentence : "); fgets(sentence,255,stdin); fputs(sentence,stdout);