当前位置:网站首页>C interview 24 (pointer) define a double array with 20 elements a
C interview 24 (pointer) define a double array with 20 elements a
2022-07-07 06:25:00 【I'm not Xiao Haiwa~~~~】
- ( The pointer ) Define a containing 20 An element of double Type of the array a, Define a pointer variable ptrDouble Point to the first address of the array , Then assign values to each element of the array through the pointer variable ( Equal to the subscript value times 3.2+1.5). Next, let the pointer point to the array a Of a[10], Find the sum of all the following elements from this element
requirement :
Output requirements :1) Output all elements of the array ;2) Output the result obtained above 10 The sum of the elements ;
Programming requirements : In addition to defining arrays a Outside , Program about arrays a All operations of must pass through pointer variables ptrDouble To achieve .
void ff(int *arr,int len)
{
int *ptrDouble=arr
边栏推荐
- 力扣62 不同路径(从矩阵左上到右下的所有路径数量) (动态规划)
- Bypass open_ basedir
- go-microservice-simple(2) go-Probuffer
- 3531. 哈夫曼树
- [shell] summary of common shell commands and test judgment statements
- Jmeter自带函数不够用?不如自己动手开发一个
- Dc-7 target
- Redis(二)—Redis通用命令
- Party A's requirements for those who have lost 800 yuan
- 谷歌 Chrome 浏览器发布 103.0.5060.114 补丁修复 0-day 漏洞
猜你喜欢
Rk3399 platform development series explanation (WiFi) 5.52. Introduction to WiFi framework composition
VMware安装后打开就蓝屏
可极大提升编程思想与能力的书有哪些?
Shared memory for interprocess communication
Experience sharing of contribution of "management world"
Dc-7 target
CloudCompare-点对选取
2022Android面试必备知识点,一文全面总结
Markdown displays pictures side by side
Ideas of high concurrency and high traffic seckill scheme
随机推荐
Open the blue screen after VMware installation
Experience sharing of contribution of "management world"
蚂蚁庄园安全头盔 7.8蚂蚁庄园答案
Knight defeats demon king (Backpack & DP)
Matlab / envi principal component analysis implementation and result analysis
jmeter 函数助手 — — 随机值、随机字符串、 固定值随机提取
2022Android面试必备知识点,一文全面总结
693. Travel sequencing
Developers don't miss it! Oar hacker marathon phase III chain oar track registration opens
对称的二叉树【树的遍历】
屏幕程序用串口无法调试情况
c语言(结构体)定义一个User结构体,含以下字段:
Ha Qu projection dark horse posture, only half a year to break through the 1000 yuan projector market!
How to use wechat cloud hosting or cloud functions for cloud development of unapp development applet
[SOC FPGA] peripheral PIO button lights up
Redis(二)—Redis通用命令
Crudini profile editing tool
MySQL(十)
JVM in-depth
When we talk about immutable infrastructure, what are we talking about