C Programming Tutorial - - Problems with String Lengths



this is helpful to prevent the program from crashing..

#include<stdio.h>

#include <stdlib.h>

int main() {

  char movie[20]; (store a movie)
  char * pMovie = movie; 
  fgets(pMovie, 20 (maximum allowed), stdin); (standard input)
  puts(pMovie); 


Thileban is awesome at programming and he likes Deadpool                                                                           
Thileban is awesome

Comments