Professional Documents
Culture Documents
a)
• labels for program elements
• case sensitive
• can consists of capital letters[A..Z], small letters[a..z], digit[0..9], and
underscore character _
• First character MUST be a letter or an underscore
• No blanks
• Reserve words cannot be identifiers
b)
c)
i) printf(“The value is %d\n”, num);
-change the double quotation and commas
ii) if (c<7)
printf(“C is less than 7\n”);
-change the curl bracket with round bracket
2)
a)
i)
b) #include <stdio.h>
int main() {
int i;
for (i=2;i<=1024;i=i*2) {
if (i==1024)
printf("%d",i);
else
printf("%d, ",i); }
return 0; }