当前位置:网站首页>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 .
边栏推荐
猜你喜欢

Cell综述:人类微生物组研究中的单细胞方法

ICLR21(classification) - 未来经典“ViT” 《AN IMAGE IS WORTH 16X16 WORDS》(含代码分析)

CVPR21-无监督异常检测《CutPaste:Self-Supervised Learning for Anomaly Detection and Localization》

Method of win7 system anti ARP attack

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

文章翻译软件-批量免费翻译软件支持各大翻译接口

VAE:变分自编码器的理解与实现

Adobe Flash player 34.0.0.92 and available version modification methods (2021-01-23

Photoshop responsive web design tutorial

BLDC 6步换相 simulink
随机推荐
Powerbi time series analysis, prediction and visualization tutorial
Dockler的基础用法
Doxygen文档生成工具
C string to short[] method
Share several coding code receiving verification code platforms, which will be updated in February 2022
使用百度EasyDL实现明厨亮灶厨师帽识别
The mystery of ID number
Quickly install torch spark, torch geometric and other packages in moment pool cloud
JDBC简单封装
adb remount of the / superblock failed: Permission denied
IMU 加热
文章翻译软件-批量免费翻译软件支持各大翻译接口
VAE: understanding and implementation of variational self encoder
Doxygen document generation tool
Cvpr21 unsupervised anomaly detection cutpaste:self supervised learning for anomaly detection and localization
R language text mining and natural language processing tutorial
读了三年论文,我今天才学会阅读摘要
idea properties文件显示\u不显示中文的解决
Web 3.0 development learning path
[notes] Apocalypse: list of practical experience and reflection of product managers