How printf(6+"hello world"); will work?? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

How printf(6+"hello world"); will work??

12th Mar 2019, 2:43 AM
Patel Jay
Patel Jay - avatar
2 Respostas
+ 4
Patel Jay : for c, string is not present and it can be considered as char pointer... so, hello world is char* argument to printf... one can do arithmetic operations + on pointer which moved pointer from zero index to sixth index... hence world would be output here.
12th Mar 2019, 3:07 AM
Ketan Lalcheta
Ketan Lalcheta - avatar
+ 1
Oov ok thanks šŸ˜‡šŸ˜‡
12th Mar 2019, 3:09 AM
Patel Jay
Patel Jay - avatar