当前位置:网站首页>5. Download and use of MSDN
5. Download and use of MSDN
2022-07-06 13:25:00 【It's Wang Jiujiu】
Many students are learning C Language , face C There are so many keywords in the language 、 The operator 、 Library functions feel very big .
utilize MSDN This tool can help us understand them quickly .
Catalog
MSDN The download
The complete version of MSDN A very large , Many functions are not available to beginners .
Here is a simplified version for you on Baidu cloud MSDN, The link is permanent , For everyone to download .
Baidu cloud link :MSDN ( Lite version size :74.87.zip_ Free high speed download | Baidu SkyDrive - Share unlimited (baidu.com)
When the download is complete , Decompress the compressed package , double-click exe Can be installed .

MSDN Use
MSDN After installed , Double-click to run it .

Indexes
function MSDN, Enter into MSDN In the interface .

Click... On the left side of the interface “ Indexes ”.( Be careful : It's the index , Not search !!!) If the index is not found , Click the small arrow on the right to move the menu bar .

Function introduction
After clicking the index , Enter the content we want to query in the blank space below . for example :strlen

On the screen strlen And three other related functions , Here you just need to see strlen The information of .
Below the headline “Get the length of a string.” It's right strlen The explanation of , come to know strlen Is used to find the length of the string .
Function structure
following , That's right strlen The use structure of .

size_t: Expressed as strlen The return value of is an unsigned integer .
const char* string: Cannot pair through pointer string Make changes , But you can use variable name pairs string Make changes .
char* const string: Cannot pass variable name pair string Make changes , But you can use the pointer to string Make changes .
Here to size_t as well as const char* string It doesn't matter if you don't understand , Remove them all , Just look at strlen(strlen); that will do .
The header file
Under the structure introduction , It's called strlen The header file that the function needs to contain .

Find through the table , If the strlen function , Need to include header file <string.h>.Compatibility For compatibility , Don't know too much about , The computers we currently use are all compatible .
Return value Introduction
Libraries Part of the content is : Library files required by the program when it runs , Usually, the LIB or DLL The form provides , Don't pay too much attention to this part .
The next convenience is the introduction of the return value :

Through the introduction, I learned :strlen Returns the number of characters in a string , But it does not include terminals NULL( No return ‘\0’). When an error is reported , No value returned .
Example
Slide the roller down ,MSDN It also gives us examples strlen How to use it? .

Copy the above code , Paste into our VS in , Test whether it is with output The display is consistent .
#include <conio.h>
#include <dos.h>
These two lines of header files are actually useless , You can delete , And just now there is no display in the header file .
#include <string.h>
#include <stdio.h>
void main(void)
{
char buffer[61] = "How long am I?";
int len;
len = strlen(buffer);
printf("'%s' is %d characters long\n", buffer, len);
}Compare the , We can find that the output content is consistent .

Of course ,MSDN The example version in is older , A lot of writing is out of date , It is not recommended that you learn , The example just refers to how the function is used .
边栏推荐
- MySQL limit x, -1 doesn't work, -1 does not work, and an error is reported
- Record: Navicat premium can't connect to MySQL for the first time
- Solution: warning:tensorflow:gradients do not exist for variables ['deny_1/kernel:0', 'deny_1/bias:0',
- 2.C语言初阶练习题(2)
- 几道高频的JVM面试题
- E-R graph to relational model of the 2022 database of tyut Taiyuan University of Technology
- TYUT太原理工大学2022数据库大题之数据库操作
- FileInputStream和BufferedInputStream的比较
- First acquaintance with C language (Part 1)
- Several high-frequency JVM interview questions
猜你喜欢

架构师怎样绘制系统架构蓝图?

西安电子科技大学22学年上学期《信号与系统》试题及答案

抽象类和接口

View UI Plus 发布 1.2.0 版本,新增 Image、Skeleton、Typography组件

Application architecture of large live broadcast platform

阿里云一面:并发场景下的底层细节 - 伪共享问题

MySQL 30000 word essence summary + 100 interview questions, hanging the interviewer is more than enough (Collection Series

C语言实现扫雷游戏(完整版)

2年经验总结,告诉你如何做好项目管理

10 minutes pour maîtriser complètement la rupture du cache, la pénétration du cache, l'avalanche du cache
随机推荐
西安电子科技大学22学年上学期《基础实验》试题及答案
Counter attack of flour dregs: redis series 52 questions, 30000 words + 80 pictures in detail.
View UI plus releases version 1.1.0, supports SSR, supports nuxt, and adds TS declaration files
Redis cache obsolescence strategy
Set container
Questions and answers of "Fundamentals of RF circuits" in the first semester of the 22nd academic year of Xi'an University of Electronic Science and technology
CorelDRAW plug-in -- GMS plug-in development -- Introduction to VBA -- GMS plug-in installation -- Security -- macro Manager -- CDR plug-in (I)
XV Function definition and call
MySQL limit x, -1 doesn't work, -1 does not work, and an error is reported
学编程的八大电脑操作,总有一款你不会
2.C语言矩阵乘法
系统设计学习(二)Design a key-value cache to save the results of the most recent web server queries
初识C语言(下)
Branch and loop statements
System design learning (I) design pastebin com (or Bit.ly)
arduino+DS18B20温度传感器(蜂鸣器报警)+LCD1602显示(IIC驱动)
167. Sum of two numbers II - input ordered array - Double pointers
First acquaintance with C language (Part 2)
TYUT太原理工大学2022“mao gai”必背
TYUT太原理工大学往年数据库简述题