string.h not necessary in a C code -


i'm coding in c , realize program :

#include <stdio.h> int main(int argc, char *argv[]) {     char name[100];      printf("what's name ");     scanf("%s", name);     printf(hi %s, nic meet !", name);      return 0; } 

the problem realized without string.h, program work when it's not supposed because there string. can explain me why works?

you used printf() , scanf() in code. both declared in stdio.h.

"there string" not imply "string.h must included". "refer data type or function declared in string.h" does.


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

node.js - Express and Redis - If session exists for this user, don't allow access -