C Programming Question and Answers
37. | How will you print "Hello World" without semicolon? |
---|---|
int main (void) { if (printf("Hello World")); } |
|
38. | Can the "if" function be used in comparing strings? |
---|---|
No. " if"command can only be used to compare numerical values and single character values. For comparing string values, there is another function called strcmp that deals specifically with strings. | |
39. | What is the difference between text files and binary files? |
---|---|
Text files contain data that can easily be understood by humans. It includes letters, number and other characters. On the other hand, binary files contain 1s and 0s that only computers can interpret. | |
40. | What is the difference between printf and cprintf? |
---|---|
|
|