"C Primer Plus" NOTE 2

Source: Internet
Author: User

1. How do I address the basic module of C?

The C language contains one or more functions, and they are the basic modules of C.

2. What is a syntax error and what is a semantic error?

Grammatical errors are made by non-adherence to the grammar rules of the C language, and semantic errors are errors in meaning.

3. Which of the following is the C keyword: main int function char =

int Char

4. Write a program that can produce the following output:

smile! smile! smile!

smile! smile!

smile!

Defines a string that can be displayed in a program smile! function, and call it when needed.

#include <stdio.h>
int s (int a);

int main ()
{
S (3);
S (2);
s (1);
return 0;
}

int s (int a)
{
printf ("smile!");
if (a==1)
{
printf ("\ n");
return 0;
}
a--;
S (a);
}

"C Primer Plus" NOTE 2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.