Interview: typical interview questions in C Language (Analysis of interview questions in C language)

Source: Internet
Author: User

Interview points:CClassical language interview questions

CAnalysis of language interview questions 5

I. Typical questions about C language pointers

A) An integer)
B) a pointer to an integer (a pointer to an integer)
C) a pointer to a pointer pointing to an integer (a pointer to a pointer)
To an integer)
D) an array of 10 integers (an array of 10 integers)
E) an array with 10 pointers pointing to an integer (an array of 10 pointers
Integers)
F) A pointer to an array with 10 integers (a pointer to an array of 10 integers)
G) a pointer to a function. The function has an integer parameter and returns an integer (a pointer to a fu ).
Nction that takes an integer as an argument and returns an integer)
H) An array with 10 pointers pointing to a function that has an integer parameter and returns an integer
Number (an array of ten pointers to functions that take an integer argument and R
Eturn an integer)

The answer is:
A) int A; // an integer
B) int * A; // a pointer to an integer
C) int ** A; // a pointer to an integer
D) int A [10]; // an array of 10 Integers
E) int * A [10]; // an array of 10 pointers to Integers
F) int (* A) [10]; // a pointer to an array of 10 Integers
G) int (* A) (INT); // a pointer to a function a that takes an integer argument
And returns an integer
H) int (* A [10]) (INT); // an array of 10 pointers to functions that take an int
Eger argument and return an integer

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.