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. mariadb+haproxy实现负载均衡(一)

    根据实际情况,数据生产无论是量还是使用地方都在稳步增加,单一服务器的稳定性也越来越受到关注,所以想提前做好技术准备. 因为之前就安装好了数据库,现在只讨论haproxy的安装及相关使用. haprox ...

  2. Python学习之String

    Strings可以想象成一个有序列的数组 #Indexing planet = 'Pluto' planet[0] 'P' #Slicing planet[-3:] 'uto' #How long l ...

  3. 项目案例模板之jdbc两种连接方式

    项目案例模板之jdbc两种连接方式 第一种连接方式 JDBCUtils.java package jdbc; ​ import org.junit.jupiter.api.Test; ​ import ...

  4. Spring Cloud(二):服务消费者

    创建“服务消费者” 创建一个基础的Spring Boot工程,命名为springboot-consumer,并在pom.xml中引入需要的依赖内容: <dependency> <gr ...

  5. eclipse中离线安装activit插件

    离线安装activiti教程: 1.先下载压缩包和jar包 链接:https://pan.baidu.com/s/1hSToZt_4A262rUxc8KToCw 密码:j5r1 2.将下载好的jars ...

  6. 完整剖析SpringAOP的自调用

    摘要 spring全家桶帮助java web开发者节省了很多开发量,提升了效率.但是因为屏蔽了很多细节,导致很多开发者只知其然,不知其所以然,本文就是分析下使用spring的一些注解,不能够自调用的问 ...

  7. 使用DevExpress的PdfViewer实现PDF打开、预览、另存为、打印(附源码下载)

    场景 Winform控件-DevExpress18下载安装注册以及在VS中使用: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/1 ...

  8. StackOverflow 周报 - 第四周高质量问题的问答(Java、Python)

    这是 Stack Overflow 第三周周报,由于本周周四外出,所以只有三篇内容.两篇 Java.一篇 Python.公众号「渡码」为日更,欢迎关注. DAY1. 枚举对象 == 和 equals ...

  9. TensorFlow2.0(1):基本数据结构—张量

    1 引言 TensorFlow2.0版本已经发布,虽然不是正式版,但预览版都发布了,正式版还会远吗?相比于1.X,2.0版的TensorFlow修改的不是一点半点,这些修改极大的弥补了1.X版本的反人 ...

  10. jmeter 遍历数据库