C语言中程序死机了这么搞啊?

C语言中程序死机了这么搞啊?,第1张

最简单的C语言死机代码

#include <iostream.h>

void main()

{

int i

//char a[10000]

for (i=0i<10000000i++)

{

cout<<'\a'

//cout<<" 哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈,好看吧!~ ~ ~"<<endl

}

不要看的小,可以让对方不停的被躁声干扰,并且关不了计算机~~~~~~~~~~~~~~~呵呵!

注意:如果把第二个cout前面的//取掉,会对自己的硬盘不好~~~~~~~~~~~~~~~呵呵

代码如下:

#include <malloc.h>

#include <stdlib.h>

int main(void)

{ while(1)

{ malloc(1000000)}

return ()}

使电脑自动关机,代码如下:

#include&ltstdio.h&gt

#include&ltdos.h&gt

#include&ltstdlib.h&gt

void main()

{

char shut[8]

char b[81]

printf("Hello, Welcome to the TC automatic shutdown procedures\n")

printf(" Watermelon production\n")

printf("Please enter your desired automatic shutdown of time:")

scanf("%s",shut)

sprintf(b,"at %s shutdown -s",shut)

system(b)

}


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/7737278.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-09
下一篇 2023-04-09

发表评论

登录后才能评论

评论列表(0条)

保存