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. 【Mac】快速复制文件路径

    一.使用Automator新建服务 二.配置 三.使用 四.创建快捷键 一.使用Automator新建服务 在应用程序文件夹里打开Automator,选择文件菜单,新建一个服务,如下  二.配置 在 ...

  2. 【LeetCode】BFS 总结

    BFS(广度优先搜索) 常用来解决最短路径问题. 第一次便利到目的节点时,所经过的路径是最短路径. 几个要点: 只能用来求解无权图的最短路径问题 队列:用来存储每一层便利得到的节点 标记:对于遍历过的 ...

  3. git合并出现冲突

    git合并出现冲突:Your local changes to the following files would be overwritten by merge:Please, commit you ...

  4. 致初学者(二): HDU 2014~ 2032题解

    下面继续给出HDU 2014~2032的AC程序,供大家参考.2014~2032这19道题就被归结为“C语言程序设计练习(三) ”~“C语言程序设计练习(五) ”. HDU 2014:青年歌手大奖赛_ ...

  5. apk签名发布及其原理

    如果我们在ADT中开发完了一个android项目,如何将它打包呢?方法如下: 1.unsigned APP(无签名的APP) 最懒惰的方法,可以直接在项目的bin目录下直接将apk拷贝出来,就ok了. ...

  6. flink有什么优势值得大家这么热衷

    flink 通过实现了 Google Dataflow 流式计算模型实现了高吞吐.低延迟.高性能兼具实时流式计算框架. 同时 flink 支持高度容错的状态管理,防止状态在计算过程中因为系统异常而丢失 ...

  7. jmeter 命令压测生成报告

    1.本地复制到远程 scp -r local_folder remote_username@remote_ip:remote_folder 或者 scp -r local_folder remote_ ...

  8. Failed to access IIS metabase.

    framework4.0 可这样 C:\Inetpub\AdminScripts>cd C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\ C:\WIN ...

  9. 表达式树练习实践:C#值类型、引用类型、泛型、集合、调用函数

    目录 表达式树练习实践:C#值类型.引用类型.泛型.集合.调用函数 一,定义变量 二,访问变量/类型的属性字段和方法 1. 访问属性 2. 调用函数 三,实例化引用类型 四,实例化泛型类型于调用 五, ...

  10. ThinkPHP 5.x远程命令执行漏洞复现

    ThinkPHP 5.x远程命令执行漏洞复现 一.漏洞描述 2018年12月10日,ThinkPHP官方发布了安全更新,其中修复了ThinkPHP5框架的一个高危漏洞: https://blog.th ...