北京术锐嵌入式软件笔试 9-17
《嵌入式软件开发笔试与面试手册》:https://blog.nowcoder.net/zhuanlan/jvN8gj
《软件开发笔试汇总》:https://www.nowcoder.com/creation/manager/columnDetail/0oDWVm
点赞收藏超50附上参考答案
1.32位CPU上,s1到s8的值分别是多少?如果值不确定请解释原因?
#include <stdint.h> struct A{ short s; uint32_t u1; union{ char c; float f; }; uint32_t u2; char cc; }; struct B{ char c; }; struct C{ virtua1 ~C{} int i; }; int main(){ const char *a="1234"; char b[]="1234"; char c[4]; auto s1 = sizeof(a); auto s2 = sizeof(b); auto s3 = sizeof(c); auto s4 = strlen(a); auto s5 = strlen(b); auto s6 sizeof(A); auto s7 = sizeof(B); auto s8 = sizeof(C); return 0 }
2
#include <iostream> using namespace std; class classA{ public: classA() { cout << " >> classA Ctor"; } virtual ~classA() { cout << " >> classA Dtor"; } }; class interfaceB : public classA { public: virtual void method5() = 0; }; class classB : public interfaceB{ public: classB() { cout << " >> ss classB Ctor"; } ~classB() { cout << " >> ss classB Dtor"; } virtual void method5() {}; }; int main() { classA a; classB *b = new classB(); delete b; return 0; }
1.写出上面程序的执行结果
>> classA Ctor >> classA Ctor>> ss classB Ctor >> ss classB Dtor >> classA Dtor >>classA Dtor
2. main函数改成如下实现后,写出执行结果
int main() { classA a; classA *b = new classB(); delete b; return 0; }
>> classA Ctor >> classA Ctor>> ss classB Ctor >> ss classB Dtor >> classA Dtor >> classA Dtor
3
字符转换为大写int toupper(int c)
#include <iostream> #include <cstring> #include <cctype> using namespace std; class Mystring { private: char *representation; public: Mystring( const char* ); const char getupperstringO const; }; MyString::Mystring( const char* new_string ){ //增加实现代码 } const char * MyString::getUpperString() const { return representation; } int main() { const Mystring Lowercase( "lower" ); cout << Lowercase.getUpperString() << endl; return 0; }
5.写ISOTCP/IP
剩余60%内容,订阅专栏后可继续查看/也可单篇购买
嵌入式软件笔试-24届真题汇总 文章被收录于专栏
本专栏主要发布嵌入式软件开发相关岗位2023年(2024届)的笔试真题(嵌入式软件开发、通用软件开发、C/C++软件开发、算法工程师、数据开发、测试开发等)主要是算法编程题,其中一些岗位笔试含有对应的选择题、填空题、简单题。