Article Directory
putty
Raspberry Pi 3B+
1. Raspberry Pi executes the .c file
- Create the file using the command nano helloworld.c commandnano hello.c
- Edit the code as follows
#include <assert.h>
#include <stdio.h>
int main()
{
int x;
char str[40];
printf("请输入一个大于10整数值: ");
scanf("%d", &x);
assert(x > 10);
printf("输入的整数是: %d\n", x);
printf("请输入字符串: ");
scanf("%s", str);
assert(str != NULL);
printf("输入的字符串是: %s\n", str);
return(0);
}
- Use the gcc tool to compile and run
to compile in one step:gcc hello.c -o hello
- run:./hello
2. Use the scp command to practice file copy and transfer
-
File content on Ubuntu
-
Use the command scp on Ubuntu
scp 本地Linux系统文件路径 远程用户名@IP地址:远程系统文件绝对路径名
- Raspberry Pi received successfully