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. 《2019面向对象程序设计(java)课程学习进度条》

    学习资源 1.教材P28-P76 2.第3章教学课件3.1-3.8 3.corejava.zip中第3章示例程序3-1—3-5 4.Eclipse简明教程.pdf 5.MOOC & 视频:浙江 ...

  2. 3.python之文件操作

    一.文件操作初识 f = open('文件路径', '编码方式', '操作方式') # 注意里面所有内容,需加引号 ” 打开一个文件需要知道的内容有: 文件路径:c:\文件.txt(绝对路径和相对路径 ...

  3. SSL证书部署相关知识总结

    证书生成工具,手动:Keymanager工具https://keymanager.org/ 证书服务商集成:可自由获得TrustAsia.Let’s Encrypt颁发的 免费证书. Keymanag ...

  4. sql 增删改列名

    添加列:alter table table_name add new_column data_type [interality_codition] ALTER TABLE dbo.tb newColu ...

  5. centos7安装mongodb以及使用

    https://blog.csdn.net/sun007700/article/details/100671570

  6. kubernetes搭建Harbor无坑及Harbor仓库同步

    一.helm搭建harbor 1.安装helm 1.1.安装helm客户端 tar -zxvf helm-v2.14.3-linux-amd64.tar.gz mv linux-amd64/helm ...

  7. 新建web工程

    1.选择新建Dynamic  Web Project 2.选择服务器和版本(2.5) 3.WebContend目录下新建一个html文件 4.运行 工程的目录结构: WEB-INF目录时受保护的,不能 ...

  8. [AWS] S3 Bucket

    云存储服务 2.1 为网站打开属性 属性和权限设置 设置bucket属性,打开功能:Static website hosting(静态网站托管) 设置bucket权限,Permissions ---- ...

  9. mybatis中Insert后主键返回

    1.Mapper的写法,返回的这个int是受影响的行号 int insertNewUser(User newUser); 2.xml的写法 <!--返回主键 形式1 --> <ins ...

  10. 第八届蓝桥杯java b组第九题

    标题: 分巧克力 儿童节那天有K位小朋友到小明家做客.小明拿出了珍藏的巧克力招待小朋友们.    小明一共有N块巧克力,其中第i块是Hi x Wi的方格组成的长方形. 为了公平起见,小明需要从这 N ...