You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there are any errors in my answer, feel free to correct them below.
Apart from b) If, c) main and d) printf, the rest of the options are all keywords.
Explanation:
If is not the same as if. Since C is a case-sensitive language, the latter which is a keyword, is not recognized to be the same as the former.
try declaring a int variable called main with some value, and try printing it on the screen. It has been hard-coded to be called by the operating system while executing a C program.
printf is a part of the standard input/output library stdio.h. You can create your own variable called printf, although you can no longer use the printf() function.
The text was updated successfully, but these errors were encountered:
ghost
changed the title
Section 2.7, Question 6 - main is a keyword in C
Section 2.7, Question 6 - "Which of the following are keywords in C?"
May 29, 2022
If there are any errors in my answer, feel free to correct them below.
Apart from
b) If
,c) main
andd) printf
, the rest of the options are all keywords.Explanation:
If
is not the same asif
. Since C is a case-sensitive language, the latter which is a keyword, is not recognized to be the same as the former.int
variable calledmain
with some value, and try printing it on the screen. It has been hard-coded to be called by the operating system while executing a C program.printf
is a part of the standard input/output librarystdio.h
. You can create your own variable calledprintf
, although you can no longer use theprintf()
function.Source:
The text was updated successfully, but these errors were encountered: