The most complete embedded question bank will appear when you go to the company for an interview.
Now embedded has developed so fast that many people have begun to embark on the road of embedded learning. according to market statistics, some people who graduate or are looking for a job will get stuck in this place when interviewing a company, that is, the interview question. many people are very good at the interview, but when they do the interview questions, their kung fu is not deep enough, and they are finally brushed down by the interview questions, making it a difficult problem to find a job. There is an empty talent, and this is also a summary of some embedded interviews of some air disaster households, you can learn, oh, to the company interview is generally there.
Please click on more Huaqing Vision embedded question Bank to share the collection.
(1) what is the difference between the above three char constp char constp const char * p?
Answer:
Char * const p; / / constant pointer. Can the value of p be modified?
The pointer to the constant can not be changed to char const / const char / and char const * p.
Char * const p is a char pointer, which is constant and cannot be modified, that is, a statement like pqq is incorrect.
Char const p and const char p are the same chartype pointers, and the characters pointed to by the pointer are regarded as constant and are not allowed to be modified, that is, statements like * p = Q are incorrect.
(2) char str1 [] = "abc"; charstr2 [] = "abc"; const char str3 [] = "abc"; const charstr4 [] = "abc"; const char str5 = "abc"; const char str6= "abc"; char str7 = "abc"; char str8 = "abc"; cout < (str1 = = str2) < < endl; cout < (str3 = = str4) < < endl; cout < (str5 = = str6) < endl; cout <