当前位置:网站首页>Preliminary learning function (3rd blog)
Preliminary learning function (3rd blog)
2022-07-28 19:31:00 【Jarvis with stars and moon】
C Classification of functions in language
(1)1 Library function
2 Custom function
(2) Several simple library functions :1 Print function printf
//2 Copy strcpy
//3 Calculation n Of k Such an operation to the power pow
//(3) Composition of functions :( Custom function )
//ret_type fun_name(para1, *);
//{
//
// statement;// Statement item
//}
// ret_type Return type
// fun_name Function name
// para1 Function parameter
// Example
// Write a function to find the maximum value of two integers .
// int Add(int x , int y)
//{
// int z = x + y;
// return z;
//}
// int main()
//{
// int a = 10;
// int b = 20;
// int sum = Add(a, b);
// printf("%d\n", sum);
// return 0;
//}
// Common library functions
// io function
// String manipulation functions Such as strlen You can find the length of the string , Of course ,sizeof It's fine too
// Memory manipulation function Such as memste
// Time / Date function Such as time
// Mathematical functions
// Other functions
#include<string.h>
//int main()
//{
// char arr1[] = "bit";
// char arr2[] = "###########";
// strcpy(arr2, arr1);
// // take \0 It's also copied
// printf("%s\n", arr2);
// return 0;
//}
int main()
{
char arr[] = "hello world";
memset(arr, '*', 5);
//memste- Memory set - Set up
printf("%s\n", arr);
return 0;
}
www.cplusplus.com
http://en.cppreference.com
English is very important , At least you should understand the literature .
边栏推荐
- Accumulation and development -- the way of commercialization of open source companies
- ES6's new data container map
- BLDC 6步换相 simulink
- 当CNN遇见Transformer《CMT:Convolutional Neural Networks Meet Vision Transformers》
- Fantasy 5 (ue5) game engine complete course 2022
- Application of time series database in bridge monitoring field
- 美国将提供250亿美元补贴,鼓励英特尔等芯片制造商迁回产线
- source insight项目导入和使用教程
- idea properties文件显示\u不显示中文的解决
- 使用Xilinx MIG验证硬件DDR设计
猜你喜欢

当CNN遇见Transformer《CMT:Convolutional Neural Networks Meet Vision Transformers》

使用百度EasyDL实现明厨亮灶厨师帽识别

Rust 入门指南(crate 管理)

使用Xilinx MIG验证硬件DDR设计

Pagoda panel construction novel CMS management system source code measurement - thinkphp6.0

Fantasy 5 (ue5) game engine complete course 2022

Application of time series database in monitoring operation and maintenance platform

Validate hardware DDR design with Xilinx MIG

Web 3.0 development learning path

英文翻译阿拉伯语-批量英文翻译阿拉伯语工具免费
随机推荐
【已解决】AC86U ML改版固件虚拟内存创建失败,提示USB磁盘读写速度不满足要求
Avoidance Adjusted Climbrate
企业级分布式爬虫框架入门
【笔记】《启示录》:产品经理的实践经验与反省清单
Photoshop responsive web design tutorial
【笔记】《结网:互联网产品经理改变世界》
NDK series (5): from introduction to practice, JNI explodes the liver and explains everything in detail!
Pytoch: implementation of crossentropyloss and labelsmoothing
博途1200/1500PLC上升沿下降沿指令编程应用技巧(bool数组)
JDBC simple encapsulation
R语言与数据分析实战11-数据的删除
Accumulation and development -- the way of commercialization of open source companies
德国、葡萄牙均宣布不会禁用华为5G设备,但德国会设定严格限制条件!
ES6 conversion of new data type set and arr set map
BLDC 6步换相 simulink
How to use Qianqian listening sound effect plug-in (fierce Classic)
英文翻译葡萄牙语-批量英文转换葡萄牙语-各种语言免费互译转换
智能合约安全——溢出漏洞
SaltStack系统初始化
Pagoda panel construction novel CMS management system source code measurement - thinkphp6.0