0 votes 0 votes static char hello[]='hello'; printf("%s",hello); The output will be same as- puts("hello"); puts(hello); printf("%s", "hello"); puts("hello\n"); Answer is 1,2 and 3. Can anyone tell what's the problem with 4 option? It is also printing hello. Programming in C programming-in-c output + – sushmita asked Dec 3, 2017 edited Mar 14, 2019 by Naveen Kumar 3 sushmita 1.4k views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply Ashwin Kulkarni commented Dec 3, 2017 reply Follow Share It will also put hello, but not same as pritf("%s",hello) 4th option will add an extra line after execution. I mean to say, Already puts adds '\n' at the end after execution but here two times '\n' will be added. & hence 1 extra line will be printed. Hence output is not same. 0 votes 0 votes prateekdwv commented Dec 3, 2017 reply Follow Share @Ashwin Well if it's about newline then only (3) is same as the original code snippet. Because, just like you said, puts prints string on STDOUT with a trailing newline. 1 votes 1 votes sushmita commented Dec 3, 2017 reply Follow Share exactly its not about newline. I dont know what is the difference in 4th option? 0 votes 0 votes Please log in or register to add a comment.