当前位置:网站首页>Macro definitions and functions
Macro definitions and functions
2022-06-12 19:48:00 【Bald boy.】
The following resources are from the bit employment class :
#define Perform find replace ,#if You can distinguish whether to compile ,#undef You can de define , That is to cancel #define Macro defined things ,#end No such thing , Only #endif, So choose D.

The first three are commonly used macros , Namely : Print the file 、 Print compile time 、 Print compilation date . besides , also __LINE__( Line number )、FUNCTION( Function name ) Isochromatic , and __MAIN__ There is no such thing as , So choose D

Conceptual questions , This method is to solve the problem that the same file contains the same header file repeatedly , choose A.

Y(5+1) After replacement, it is ((N+2)*5+1), among N yes 4, So the result is 31,2 * (4 + 31) The result is 70, choose D.

macro C The preprocessed code is :2+2*3+3, namely 2+6+3, be equal to 11, choose B.

Macro has no execution speed , It is to find and replace , choose C.A Macro is to find and replace , Cannot set recursive jump condition , Nature cannot recurse .B Macro is to find and replace , No execution , Type is impossible to talk about .D The essence of macro is directly stated in . So as long as you know that the macro is to find and replace , Other problems are not problems .

A Is a macro definition ,C It's a complex precompiled sentence , But it has nothing to do with the conditions ,D It is misused , Conditional compilation instructions include #if、#ifdef,#ifndef,#else,#elif、#endif etc. . In addition to that #if defined(xxx) Usage of . So choose B.

AB It's the opposite , Angle brackets are to go directly to the library to find , Double quotation marks are used to find... From the current directory first , Then go to the library to find .C Option header files cannot define global variables , Otherwise, if there are multiple files , That link will conflict . So choose D.D It's not perfect , In the development of large projects , This is not a good programming habit , It's better to put the classification in different header files and name them according to their characteristics , Because it is more convenient for code management and maintenance , For now , It's a good habit .
边栏推荐
- Reading small program graduation design based on wechat e-book (5) assignment
- Torch network model is converted to onnx format and visualized
- What did 3GPP ran do in the first F2F meeting?
- Demand and business model analysis -6- five topics
- 基于分布式数据库本身的定时备份方法
- review. JS ppt math formula cannot be displayed
- review.js ppt数学公式无法显示
- Reading small program based on wechat e-book graduation design (4) opening report
- 测试必备:推荐一款跨平台App性能专项测试工具!
- Méthode de sauvegarde programmée basée sur la base de données distribuée elle - même
猜你喜欢

Wechat e-book reading applet graduation design completion works (8) graduation design thesis template

什么是数据驱动

The component style set by uniapp takes effect in H5 and app, but does not take effect in wechat applet. The problem is solved

How does Eldon's ring of the law get lune quickly? Introduction to the fastest and safest method for obtaining lune

Torch network model is converted to onnx format and visualized

Installation and testing of open source deep learning framework plaidml

PostgreSQL database replication - background first-class citizen process walreceiver PG_ stat_ wal_ Receiver view

基于微信电子书阅读小程序毕业设计毕设作品(7)中期检查报告

Promise to solve hell function calls can be used infinitely

今晚7:00 | PhD Debate 自监督学习在推荐系统中的应用
随机推荐
synchronized下的 i+=2 和 i++ i++执行结果居然不一样
Reading applet based on wechat e-book graduation design (2) applet function
RT thread simulator builds lvgl development and debugging environment
EASYCODE one click plug-in custom template
负数取余问题
Unsupported class file major version 60
BigTable (II): how BigTable achieves scalability and high performance
In 2022, 20 cities with the largest number of college students in China
Wechat e-book reading applet graduation design completion works (3) background function
Business opportunities with an annual increase of 3billion - non cage eggs or a new blue ocean for export to ASEAN
Axure RP 9 for Mac(交互式产品原型设计工具)中文版
System log
The component style set by uniapp takes effect in H5 and app, but does not take effect in wechat applet. The problem is solved
Blue Bridge Cup basic-14 VIP question time conversion
[notes for question brushing] line segment tree
What did 3GPP ran do in the first F2F meeting?
IO流基础知识详解--文件及IO流原理
Torch network model is converted to onnx format and visualized
Demand and business model innovation-4-strategy
JDBC interface summary