strcmp的功能是用来比较两个串在一起.strcat函数的一个串加入到另一个用来.变姓名为基准点阵列的地址,数组.因此,如果我们试图用比较两个串下,我们将比较两种地址

Files Recovery Software
聯絡細節 客戶支持 下載演示 產品  

 
 

strcmp的功能

strcmp的功能是用来比较两个串在一起.变姓名为基准点阵列的地址,数组.因此,如果我们试图用比较两个串下,我们将比较两种地址 这显然不一样的是不可能在同一地点存放两个值.

if (first == second) /* 永远做比较弦乐 */

以下例子使用strcmp函数,比较两个串:

#include <string.h>
int main()
{
char first[80], second[80];
int t;
for(t=1;t<=2;t++)
{
printf("\nEnter a string: ");
gets(first);

printf("Enter another string: ");
gets(second);

if (strcmp(first, second) == 0)
puts("The two strings are equal");

else
puts("The two strings are not equal");
}
return 0;
}

并执行该计划将如下:

Enter a string: Tarun
Enter another string: tarun
The two strings are not equal

Enter a string: Tarun
Enter another string: Tarun
The two strings are equal

该函数strcat

strcat函数的一个串加入到另一个用来. 让我们来看看? 榜样的帮助下:

#include <string.h>
int main()
{
char first[80], second[80];

printf("Enter a string: ");
gets(first);

printf("Enter another string: ");
gets(second);

strcat(first, second);

printf("The two strings joined together: %s\n",
first);
return 0;
}

并执行该计划将如下:

Enter a string: Data
Enter another string: Recovery
The two strings joined together: DataRecovery


Previous page

page 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |17|18| 19| 20 |

 
 

page 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |30 | 31 | 32 | 33 | 34 | 35 | 36 | 37

 
 

page 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54

 
 

page 55 | 56 | 57 | 58 | 59 | 60

Next page
 
 
數據恢復預訂
 
第1章 数据恢复概述
第2章 引进硬盘
第3章 逻辑方法和磁盘操作系统
第4章 数制
第5章 采用丙方案
第6章 电脑基本概论
第7章 民政指令所需
第8章 磁盘与BIOS的功能和中断处理三
第9章 理大硬盘
第10章 从数据恢复软败坏
第11章 制作备份
第12章 阅读和修改与编程器
第13章 阅读和修改与编程布拉格反射
第14章 编程"原始档案"复苏
第15章 数据编程刮水器
第16章 对水电开发更多磁盘
附錄 词汇数据恢复职权
 
 
Pro Data Doctor

產品

聯絡細節

客戶支持

下載演示

條款和條件

 
Pro Data Doctor