小编jac*_*ck1的帖子

无法在蓝牙上打字

我的操作系统是 Arch Linux。我只是想通过终端使用笔记本电脑的蓝牙。我使用了bluetoothctl命令,但我不能再输入它了。我也使用 root 权限运行它。

[x@X ~]$ sudo bluetoothctl
[sudo] password for X: 
[bluetooth]# 
Run Code Online (Sandbox Code Playgroud)

我还使用systemctl status bluetooth命令检查了我的蓝牙守护程序,它打印了一些我不知道它是什么并且我也不知道接下来要做什么的东西。

[x@X ~]$ systemctl status bluetooth
? bluetooth.service - Bluetooth service
   Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:bluetoothd(8)
Run Code Online (Sandbox Code Playgroud)

linux bluetooth

5
推荐指数
2
解决办法
6198
查看次数

我的代码有什么问题,我希望在int中打印输出,但似乎不是?

这是我的代码,我仍然继续看错了,我是初学者,我想学习:

#include<stdio.h>
int main()
{
    int a;

    printf("Input: ");
    scanf("%d", &a);
    printf("\n%d", &a);
    a+=2;
    printf("\n%d", &a);
    a+=4;
    printf("\n%d", &a);
    a+=2;
    printf("\n%d", &a);
    return 0;
}
Run Code Online (Sandbox Code Playgroud)

这是输出:

Input: 10

-1078169908
-1078169908
-1078169908
-1078169908
Run Code Online (Sandbox Code Playgroud)

c printf

-1
推荐指数
1
解决办法
161
查看次数

标签 统计

bluetooth ×1

c ×1

linux ×1

printf ×1