Interview Time: 2015.07.15Appointment: 2015.07.14, the day before the telephone interview, you will be called to inquire about the time of the telephone interview.Interview session:No self-Introduction (this is the first time I have interviewed so many companies), direct interview content.Question 1: What are the benefits of these projects?Question 2: In the project that has been done, what is the biggest difficulty, how to solve it?Question 3: In 100 million search terms, find out the maximum n
ways to define stringsChar *s = "Jake";OrChar *s;s = "Jake";3. The difference between the two ways of definitionL Memory AnalysisL Drawing AnalysisL The difference between a constant and a variable stringL Constant Memory address viewIv. functions that return pointersThe pointer is also a data type in C, so the return value of a function can certainly be a pointer-typeL The general form of a function that returns a pointer is: type name * Function n
IntroductionSCANF is the system's own function, and the declaration is contained in the stdio.h file, so if you have the function, you must load the #include"The use of attention(1) Use the SCANF function to enter a character variable.Char A; scanf ("%c", a);(2) input multiple values simultaneously: Scanf ("%d,%d", num1,num2);Note: Here the placeholders are, separated, and require commas to be separated as input 1, 2. This is num1=1,num2=2. If intern
points: When the condition is not satisfied, the while never executes the loop body, do while at least 1 timesFor loop: Use for loop for general preferenceFormat: for (expression 1; expression 2; expression 3);for (expression 1; expression 2; expression 3) sum+=1;for (expression 1; expression 2; expression 3) {Circulation body;}Expression 1: Initialization of loop-controlled variablesExpression 2: Judging (whether the loop control variable satisfies the condition)Expression 3: Controls that al
parameter is changed, but the argument has not changed※ Pointer to the structure body* Each struct variable has its own storage space and address, so pointers can also point to struct variables* Structure pointer variable definition form: struct struct body name * pointer variable name* With pointers to structs, there are 3 ways to access struct membersstruct variable name. Member Name(* pointer variable name). Member NamePointer variable name, member name#include int main (int argc, const char
out the relationship between the previous data and the current data ( generally inductive series);2> Find the number of values that can be set for a particular value, typically the position of the smallest value, such as n=1;3>1 int pow2 (intint N)23{45if (n0return1; 6 7 return pow2 (b,n-1) *b; 8 9 }According to the listed relational writing function, for example, the relationship expression for this function:b 's n- th square = b of the n-1 - Square *b;Apply this relationship directly to Po
Programmer --- C language details 30 (Can you answer all the questions in array and pointer operation testing ??)Main Content: array and pointer Operation Test
# Include
Int main () {int a [5] = {1, 2, 3, 4, 5};/* Can you correct the output of the last statement? */Int * ptr1 = (int *) ( a + 1); int * ptr2 = (int *) (int) a + 1 ); printf (" a = % d \ n", ( a); printf ("( a + 1) = % d \ n ", ( a + 1
-dimensional array are initialized.To familiarize ourselves with the two-dimensional array, we also iterate through all the elements like a one-dimensional array.The specific code is as follows:1 Static voidPrintarr ()2 {3 int[] arr={{1,2,3,4},{5,6,7},{8,9},{10}};4 for(inti=0;i)5 {6 for(intj=0;j//Double loop traversal of two-dimensional arrays7 {8System.out.print ("arr[" +i+ "[" +j+ "] =" +arr[i][j]+ "\ T");9 }TenSystem.out.printl
the life cycle of a variable: from the start of the first execution until the file exits(2) The defined line of code executes only once(3) does not change the scope of the variableextern: placed inside a function, just a declaration of a global variable2. The role of global variablesInternal variables: Variables that can only be accessed in this fileExternal variables: Variables that can be accessed in all filesStatic: Declares or defines an internal variableextern: Declaring or defining an ext
Notoginsengprintf"After Swap_any, a=%d, b=%d\n", A, b); - return 0; the +}
Implementing an exchange of two integers
In the C language, all function arguments are passed by value, that is, the parameter values passed to the called function are stored in the temporary variable, not in the original variable, so the called function cannot directly modify the value of the variable in the key function. At this point we pass the memory a
= -; - + int*P1 = a, *P2 = b; - + Change (P1, p2); A atprintf"a=%d\nb=%d\n", *p1,*p2); - - return 0; - -}3, the common use of pointers to the scene:1) indirectly access the variables in the caller in the function:2) allow the function to have multiple return values;"Level Two pointer"1, Level Two pointers:If a pointer variable holds the address of another pointer variable, the pointer variable is a pointer variable that points to the pointer. Also for level two pointers;int*p=a;int
, you don't need release and retain.if (_car!=car) {[_car release];_car=[car retain];}In Dealloc, the release instance object[_car release];[Email protected] Parameters1. Atomicity of Atomic nonatomic2. Read and write ReadWrite readonly3. Memory management Assign retain copyReplace the Get Method name Setter=isvip,get method name Getter=isvipUse of [email protected]When importing a header file with import, all classes referencing the header file will need to be recompiled if the contents of the
protected] will not be recognized, the function of the declaration can be inside the main function can also be outside the main function.(5) Object method belongs to object allfunction: void run () {}(1) All functions are parallel.(2) function has no affiliation(3) The use of the time can be directly called(4) You cannot access member variables in an objectRelationship between an object and a method(1), the object as a parameter of the method-(void) Displayperson: (person *) person{ NSLog ("
multiplied:3And:4];//Output:12[Calculator except:3And:4];//output:0.75 return 0;}Use Note:
Classification can only be extended to methods, not to increase the definition of member variables
Methods in classes and classifications that have the same name will overwrite the same method as the original class, causing the method of the original class to be unavailable
The order of the calls is: The method priority of the classification is the highest, then the method of the origina
#include Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced. Java Programmer learns C + + string
Programmer --- C language details 29 (# define grand and small, empty struct size, flexible array I don't know if you have seen it ),Main Content: # define large and small, empty struct size, flexible array
I. # define grand and small
See examples
Ii. Empty struct size
Related to the root Compiler
3. Flexible Array
Not commonly used.
# Include
Output:
Basic concepts of pointers:format:Variable type * Variable name example: int *p; Function: Ability to access and modify the corresponding storage space based on 1 address valuesuse:Code Contact 1#include //Define an shaping variable A and assign a value of; int *p; //define an int type pointer variable *p p = a; //Get the address of variable A and assign to pointer p *p = ten; //Assign value to the storage space (that is, a) to which P points
In summary, there are three types of annotations: 1. Single-line Comment 1: //haha single-line comment2. Multi-line annotations 1: /* 2: asdfasdfasdfasdfasdf 3: * /Where multiple lines of comments are written 1: /* 2: * function is ... 3: * / 4: void dosomething () {...}The compiler can automatically recognize when the mouse clicks on the function name thing. The right side of the system can display the corresponding comment: 1: #include 2: //This is
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.