当前位置: 首页 > news >正文

电子商务网站推广计划wordpress海报式分享

电子商务网站推广计划,wordpress海报式分享,广告创意设计是什么,wordpress不能进后台C语言作为一门广泛使用的编程语言#xff0c;已经成为了许多IT领域从业者的必备技能之一。为了帮助大家更好地掌握C语言#xff0c;本文将为大家提供一些专门的C真题。 1. 指针 题目一#xff1a;请编写一个函数#xff0c;函数名为swap#xff0c;交换两个整数型变量的…        C语言作为一门广泛使用的编程语言已经成为了许多IT领域从业者的必备技能之一。为了帮助大家更好地掌握C语言本文将为大家提供一些专门的C真题。 1. 指针 题目一请编写一个函数函数名为swap交换两个整数型变量的值。 void swap(int *a, int *b) {int temp *a;*a *b;*b temp; } 题目二请编写一个函数实现对一个整型数组进行冒泡排序。 void bubble_sort(int arr[], int len) {for (int i 0; i len - 1; i) {for (int j 0; j len - i - 1; j) {if (arr[j] arr[j 1]) {swap(arr[j], arr[j 1]);}}} } 题目三请编写一个函数实现将一个字符数组中的每个字符倒序输出。 void reverse_string(char *str) {int len strlen(str);for (int i len - 1; i 0; i--) {cout str[i];} } 2. 继承与多态 题目一请编写一个基类Shape和三个派生类Circle、Rectangle和Triangle实现求各自面积的功能。 class Shape { public:virtual double get_area() {return 0;} };class Circle : public Shape { private:double r;public:Circle(double r) {this-r r;}double get_area() {return 3.14 * r * r;} };class Rectangle : public Shape { private:double l, w;public:Rectangle(double l, double w) {this-l l;this-w w;}double get_area() {return l * w;} };class Triangle : public Shape { private:double a, b, c;public:Triangle(double a, double b, double c) {this-a a;this-b b;this-c c;}double get_area() {double p (a b c) / 2;return sqrt(p * (p - a) * (p - b) * (p - c));} }; 题目二请编写一个基类Animal和三个派生类Cat、Dog和Bird实现各自发出声音的功能。 class Animal { public:virtual void make_sound() {cout Animal makes sound! endl;} };class Cat : public Animal { public:void make_sound() {cout Meow~ endl;} };class Dog : public Animal { public:void make_sound() {cout Woof! endl;} };class Bird : public Animal { public:void make_sound() {cout Chirp~ endl;} }; 3. STL库 题目一请使用STL库中的vector定义一个整型数组并利用vector进行遍历、排序、查找等操作。 vectorint vec {8, 3, 6, 2, 7, 4, 1, 5};// 遍历 for (auto item : vec) {cout item ; } cout endl;// 排序 sort(vec.begin(), vec.end()); for (auto item : vec) {cout item ; } cout endl;// 查找 auto it find(vec.begin(), vec.end(), 7); if (it ! vec.end()) {cout Found: *it endl; } else {cout Not found! endl; } 题目二请使用STL库中的map定义一个字典实现添加、查找、删除单词的功能。 mapstring, string dict;// 添加单词 dict.insert(pairstring, string(apple, 苹果)); dict.insert(make_pair(banana, 香蕉)); dict[cherry] 樱桃;// 查找单词 auto it dict.find(apple); if (it ! dict.end()) {cout it-second endl; } else {cout Not found! endl; }// 删除单词 dict.erase(banana); 4. 文件操作 题目一请编写一个程序将一个文本文件中的每一行反转。 ifstream fin(input.txt); ofstream fout(output.txt);string line; while (getline(fin, line)) {reverse(line.begin(), line.end());fout line endl; }fin.close(); fout.close(); 题目二请编写一个程序实现将一个二进制文件中的数据进行加密和解密。 ifstream fin(input.bin, ios::binary); ofstream fout(output.bin, ios::binary);char key 123; // 密钥可以自己定义char ch; while (fin.get(ch)) {ch ^ key; // 异或运算实现加密和解密fout.put(ch); }fin.close(); fout.close();
http://wiki.neutronadmin.com/news/260430/

相关文章:

  • 东莞网站推广运营抖音网站建设的基本情况
  • 构建电子商务网站的步骤纯flash网站价格
  • 美词原创网站建设开发中英文切换网站如何做
  • 古城做网站的公司深圳网络推广引流
  • WordPress免插件实现QQ咨询seo网站设计招聘
  • 台州知名网站广州的房地产网站建设
  • 深圳网站建设深圳企业网站建设软件下载平台哪个好
  • 网站关键字如何选择wordpress无法编辑
  • 个人网站建设的参考文献做淘客网站怎么建要购买数据库吗
  • 网站推广的渠道有哪些网站建设价目
  • 上海自助建站平台建设销售网站的好处
  • 快速搭建网站推荐专业动漫如何制作
  • 做网站最简单的网站开发成都
  • 学校网站建设领导小组网站开发与推广计划书
  • 平舆网站建设推荐几个安全免费的网站
  • 网址网页网站的区别??官方网站查询叉车证
  • 汕头网站建设sthke主要的网站开发技术
  • 青岛公司做网站天长市建设局网站
  • 南昌电商购物网站开发湖南学校网站建设
  • 工信部网站备案注销wordpress 树
  • 建设银行什么网站可买手表全球十大网站排名
  • 河南省建设厅广州网站优化排名推广
  • 完成网站的建设工作总结wordpress用户邮箱验证码
  • 校园网站规划与建设心得如何在腾讯云做网站
  • 网站导航网站开发网站设计在线培训
  • 做网站可以赚多少钱it网站开发
  • 网站开发 一般用什么语言表白网站是怎么做的
  • wordpress一步步建企业网站外贸销售怎么找客户
  • 做国内打不开的网站吗徐州seo排名公司
  • 阿里云安装wordpress数据库错误网站seo如何做