How to use puts() return value in C

1 Answer

0 votes
#include <stdio.h>
 
int main() {
    int result = puts("C Programming");
     
    printf("The total printed characters are: %d\n", result);
     
    if (result == 14) {
        puts("OK");
    }
}
 
 
 
/*
run:
 
C Programming
The total printed characters are: 14
OK
 
*/

 



answered Jun 6, 2023 by avibootz

Related questions

1 answer 302 views
1 answer 241 views
1 answer 346 views
4 answers 760 views
1 answer 211 views
211 views asked Jun 6, 2023 by avibootz
1 answer 197 views
197 views asked Oct 12, 2020 by avibootz
1 answer 4,107 views
...