Start from scratch-01. Test the C language environment and start from scratch-01. C Language
It takes the following steps to write a C program on Mac:
Specific steps:
Summary clang commands
Compile: cc-c xxx. c
Link: cc xxx. o
Compilation and link: cc xxx. c
Run the executable file in the current path:./a. out
Change the executable file name: cc xxx. c-o xxxxx
Compile: Only checks whether the syntax is correct and does not check whether the main function exists.
Link: Check whether the main function is available.
Why can I test the performance of C language?
C language testing is an essential and effective way to recruit embedded system programmers. Over the years, I have both participated in and organized many such tests. During this process, I realized that these tests could provide a lot of useful information for both the interviewer and the subject. Besides, I did not talk about the interview pressure, this test is also quite interesting.
From the perspective of the subject, you can learn a lot about the problem or invigilator. Is this test designed to show the ANSI standard details rather than technical skills? Is this a silly question? To obtain the ASCII value of a character. Do these questions focus on your system call and memory allocation policy capabilities? This indicates that the author may spend time on a microcomputer rather than an embedded system. If the answer to any of the above questions is "yes", I know that I have to seriously consider whether I should do the job.
From the perspective of the interviewer, a test may reveal the examinee's quality in many aspects: the most basic, you can understand the examinee's C language level. No matter how it works, it's interesting to see how this person answers questions he doesn't know. Should the examinee make a wise choice with a good intuition, or is it just blind? When the examinee gets stuck on a problem, is it an excuse? Is it a real curiosity about the problem? Does it look like a learning opportunity? I found this information as useful as their test scores.
With these ideas, I decided to give some questions that really target embedded systems. I hope these headaches can help people looking for work. I have encountered these problems over the years. Some of these questions are difficult, but they should give you some inspiration.
This test is suitable for candidates of different levels. Most primary-level candidates have poor performance, and experienced programmers should have good performance. In order for you to determine the preference of some questions, no score is assigned for each question. If you choose these questions for your use, please assign scores according to your meaning.
Reference: Xinhua Education
R8C microcontroller C language programming p1 & = 0x01; pd4 & = 0x20; what are the meanings of these operators here? Thank you for your advice.
& Yes and computation ~ Is bitwise Inversion
P1 & = ~ 0x01 is P1 = P1 &~ 0x01 //~ 0x01 bitwise inversion, that is, every user obtains the inverse ,~ 0x01 = 0xfe
P1 & = ~ 0x01 is P1 = P1 & 0xfe
Pd4 & = ~ 0x20 means Pd4 = Pd4 & 0xdf