c++ exercises
1.定义个数组并初始化,然后将数组倒置,并显示倒置前和倒置后的结果。
#include <iostream>
#include <stdio.h>
using namespace std; void main()
{
#pragma region 第一题
int iNum[] = { ,,,,, };
for (int a=;a<;++a)
{
cout << iNum[a];
}
cout << endl;
int *a,*b,*c;//*引用操作符 指针
for (int d = ; d < ; d++)
{
a = &iNum[d];//&取地址符 指针
b = &iNum[ - d];
*a ^= *b;//按位异或赋值
*b ^= *a;
*a ^= *b;
}
for (int a = ; a < ; a++)
{
cout << iNum[a];
}
cout << endl;
#pragma endregion
c++ exercises的更多相关文章
- [Bhatia.Matrix Analysis.Solutions to Exercises and Problems]Contents
I find it may cost me so much time in doing such solutions to exercises and problems....I am sorry t ...
- 46 Simple Python Exercises (前20道题)
46 Simple Python Exercises This is version 0.45 of a collection of simple Python exercises construct ...
- State Estimation for Robotics (Tim Barfoot) exercises Answers
Here are some exercises answers for State Estimation for Robotics, which I did in June, 2017. The bo ...
- Linux command line exercises for NGS data processing
by Umer Zeeshan Ijaz The purpose of this tutorial is to introduce students to the frequently used to ...
- 100 numpy exercises
100 numpy exercises A joint effort of the numpy community The goal is both to offer a quick referenc ...
- 46 Simple Python Exercises-Very simple exercises
46 Simple Python Exercises-Very simple exercises 4.Write a function that takes a character (i.e. a s ...
- Exercises for IN1900
Exercises for IN1900October 14, 2019PrefaceThis document contains a number of programming exercises ...
- Coroutine 练习 1 - Coroutine Exercises 1
Coroutine 练习 1 - Coroutine Exercises 1 字典中为动词 “to yield” 给出了两个释义:产出和让步.对于 Python 生成器中的 yield 来 说,这两个 ...
- Proofs without Words:Exercises in Visual Thinking(v.1 and v.2)
下面是手画的和拍的一些图片,出自标题中的那两本书,在图书馆草草浏览了半个小时,就把一眼能看出来的摘到这里了,再复杂一些的感觉违背了无字证明的初衷了,就没有摘录: 勾股定理: 希波克拉底定理: 无限步三 ...
- Exercises - Kangaroo
Write a definition for a class named Kangaroo with the following methods: An __init__ method that in ...
随机推荐
- (六十)c#Winform自定义控件-鼓风机(工业)
前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. GitHub:https://github.com/kwwwvagaa/NetWinformControl 码云:ht ...
- 基于GitLab+Jenkins的DevOps赋能实践
随着微服务.中台架构的兴起,DevOps也变得非常关键,毕竟是一些基础设施层面的建设,如果搞好了对后面的研发工作会有很大的效率提升.关于DevOps本身的概念,网上已经非常多了,在园子里随便搜索一些都 ...
- 树莓派4B 安装CentOS
刚入手了一个树莓派4B替换掉旧的3B搭Nas.吐槽下3B的网卡和USB速度真的太慢. 虽然官方推荐的是Debina,由于习惯了CentOS不想增加学习成本,我还是决定用CentOS. 镜像下载地址:h ...
- Python(Head First)学习笔记:一
目录: 1 认识Python:Python的特点.安装.开发环境搭建 2 共享代码:连接共享社区.语法.函数.技巧 3 文件与异常:调试.处理错误.迭代.改进.完善 4 持久存储:文件存储.读写 5 ...
- FreeSql (三)实体特性
主键(Primary Key) class Topic { [Column(IsPrimary = true)] public int Id { get; set; } } 约定: 当没有指明主键时, ...
- android.intent.category.BROWSABLE
参考: http://blog.csdn.net/annkie/article/details/8349626 http://xiechengfa.iteye.com/blog/1004991 BRO ...
- mysql数据库事务隔离原理
今天在学习JDBC的时候看到了关于MySQL的事务的隔离级别的问题,感觉内容挺高级的,所以记录一篇文章,以备后面使用. 数据库隔离级别有四种,应用<高性能mysql>一书中的说明: 然后说 ...
- 自动更新Aria2中的bt-trackers选项
#!/bin/bash /usr/sbin/service aria2 stop list=`wget -qO- https://raw.githubusercontent.com/ngosang/t ...
- nfs 存储服务
今日内容: NFS 1.什么是nfs? network file system 网络文件系统 nfs共享存储 2.nfs能干什么? nfs 能为 不同主机系统之间 实现 文件的共享 3.为什么要使用n ...
- Tcloud 云测平台-多服务框架开源
技术栈 Python3.7 + Vue前端github地址:https://github.com/bigbaser/Tcloud后端github地址:https://github.com/bigbas ...