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的更多相关文章

  1. [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 ...

  2. 46 Simple Python Exercises (前20道题)

    46 Simple Python Exercises This is version 0.45 of a collection of simple Python exercises construct ...

  3. 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 ...

  4. 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 ...

  5. 100 numpy exercises

    100 numpy exercises A joint effort of the numpy community The goal is both to offer a quick referenc ...

  6. 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 ...

  7. Exercises for IN1900

    Exercises for IN1900October 14, 2019PrefaceThis document contains a number of programming exercises ...

  8. Coroutine 练习 1 - Coroutine Exercises 1

    Coroutine 练习 1 - Coroutine Exercises 1 字典中为动词 “to yield” 给出了两个释义:产出和让步.对于 Python 生成器中的 yield 来 说,这两个 ...

  9. Proofs without Words:Exercises in Visual Thinking(v.1 and v.2)

    下面是手画的和拍的一些图片,出自标题中的那两本书,在图书馆草草浏览了半个小时,就把一眼能看出来的摘到这里了,再复杂一些的感觉违背了无字证明的初衷了,就没有摘录: 勾股定理: 希波克拉底定理: 无限步三 ...

  10. Exercises - Kangaroo

    Write a definition for a class named Kangaroo with the following methods: An __init__ method that in ...

随机推荐

  1. go 学习笔记之无心插柳柳成荫的接口和无为而治的空接口

    如果你还了解编程概念中的接口概念,那么我建议你最好还是先阅读上一篇文章.详情请点击 go 学习笔记之万万没想到宠物店竟然催生出面向接口编程? ,否则的话,请自动忽略上文,继续探索 Go 语言的接口有什 ...

  2. 使用Nginx、Nginx Plus防止服务器DDoS攻击

    分布式拒绝服务攻击(DDoS)指的是通过多台机器向一个服务或者网站发送大量看似合法的数据包使其网络阻塞.资源耗尽从而不能为正常用户提供正常服务的攻击手段.随着互联网带宽的增加和相关工具的不断发布,这种 ...

  3. 手工释放服务器的swap分区缓存

    时间     恢复时间 状态 信息 主机 问题 • 严重性 持续时间 确认 动作 2019-03-21 20:29:30     09:51:30     -ai-代理 Lack of free sw ...

  4. 运行sudo apt-get install nginx时报错有几个软件包无法下载,要不运行 apt-get update 或者加上 --fix-missing 的选项再试试?解决

    运行sudo apt-get install nginx时报错有几个软件包无法下载,要不运行 apt-get update 或者加上 --fix-missing 的选项再试试?解决办法 第一步:运行s ...

  5. 基于 HTML5 的 PID-进料系统可视化界面

    前言 随着工业物联网和互联网技术的普及和发展,人工填料的方式已经逐渐被机械设备取代.工业厂商减小误操作.提升设备安全以及追求高效率等制造特点对设备的要求愈加高标准.严要求.同时机械生产以后还需遵从整个 ...

  6. 警告:Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent!

    执行Maven Install打包的时候,提示以下警告信息: [WARNING] Using platform encoding (GBK actually) to copy filtered res ...

  7. Android Q 正式命名为 Android 10

    根据官方博文,谷歌已经公布了 Android Q 的名称,它并不是想以前一样,以甜食命名,也不是以任何以字母 Q 开头来命名,而是简单称它为 Android 10. 该公司表示,它正在改变其发布版本的 ...

  8. idea控制台乱码解决方案

    第一步:修改intellij idea配置文件: 找到intellij idea安装目录,bin文件夹下面idea64.exe.vmoptions和idea.exe.vmoptions这两个文件,分别 ...

  9. Redis的复制(Master/Slave)、主从复制、读写分离 (下)

    哨兵模式(就是反客为主的自动版) 能够自动监控主机是否故障,如果故障了根据投票数自动将从机变成主机 1创建哨兵文件 touch sentinel.conf [root@localhost myredi ...

  10. Winform中对ZedGraph的RadioGroup进行数据源绑定,即通过代码添加选项

    场景 在寻找设置RadioGroup的选项时没有找到相关博客,在DevExpress的官网找到 怎样给其添加选项. DevExpress官网教程: https://documentation.deve ...