+ 2

Structure Structure

This is a quiz question. Can someone explain how the answer is “Sololearn9”. The quiz is below: struct xyz { char *n; int eos; }; struct xyz x = {“Sololearn”, 2018}: struct xyz y = x; printf(“%d”, printf(“%s”, y.n)); Thanks

18th Sep 2020, 2:12 AM
Joe Bosah
1 RĂ©ponse
+ 3
Hello. printf() return the number of characters writed so printf(“%s”, y.n) write the word "Sololearn" and the number of characters writed are passed as the argument for the printf("%d"). Have a nice day. 😁
18th Sep 2020, 3:31 AM
Benjamin Alejandro Luna
Benjamin Alejandro Luna - avatar