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

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

html - Outlook 2010 Anchor (url/address/link) -

android - How to create dynamically Fragment pager adapter -