C Language Exercise 4

Source: Internet
Author: User

15. Program segment: int num=2; while (NUM)
printf ("%d,", num--); The result is _______________ A. 2,1, B. 2,1 C. 2,1,0 D. 2,1,0,
16. If there is a description: int a[3][4],s, then the elements of the array a reference is correct ____________ a. s=0; for (i=0;i<=3;i++) for (j=0;j<4;j++) s+=a[i][j];  B. s=0; for (j=0;j<=4;j++) for (i=0;i<3;i++) s+=a[i][j];  C. s=0; for (i=0;i<4;i++) for (j=0;j<=3;j++) s+=a[j][i];  D. s=0; for (i=0;i<3;i++) for (j=0;j<4;j++) s+=a[i][j];

17.   If the parameter gets the address of the argument, ____________ is the argument when the function is called.  A.  array name  B.  global amount  
c.  The value of all elements in the array  D.  the number of elements in the array  
18.   If there is a definition:inti,j,*pi=&i; , then the comparison expression with i==j equivalence is ____________ a. i==*pi b. *pi ==*&j  c. i==&j d. i==**pi 
19.   If there is a definition: struct  person{ int   id    char  name[20]; } per,*s=&per;  
The following references to struct members are the correct ____________ a. per.name[0] b. s->name[0] c. per.name[8]  d. per.id

A. #include (stdio.h) b. #include [stdio.h] c. #include {stdio.h} D. #include <stdio.h>
22. A variable definition statement char A; The following assignment statement is correct. A. a= ' & '; B. A= "&"; C. a= "; D. a= ' 16 '
23. with Char ch; With the statement "Ch=getchar ();" The equivalent statement is:. A. printf ("%c", ch); B. printf ("%c", &ch); C. scanf ("%c", ch); D. scanf ("%c", &ch);

C Language Exercise 4

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.