Can I use printf for hello world by including #include <stdio.h> also? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Can I use printf for hello world by including #include <stdio.h> also?

#include <stdio.h> and use printf for hello world Why we use <iostream> instead of <stdio.h>?

24th Dec 2016, 3:59 AM
Ka Yip
2 Respostas
+ 6
<iostream> is part of the standard C++ library. <stdio.h> is part of the standard C library. WhileĀ stdio.hĀ will work in C++, it isn't recommended because it does not provide everything thatĀ iostreamĀ includes asĀ iostreamĀ is specifically for C++.
24th Dec 2016, 4:12 AM
Hatsy Rei
Hatsy Rei - avatar
+ 1
NO U CANT , KA YIP stdio.h is only used in C....u have to use IOSTREAM...PLS FOLLOW ME KA YIP
24th Dec 2016, 4:37 AM
MEDHIR
MEDHIR - avatar