首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
基础学习课
实战项目课
求职辅导课
专栏&文章
竞赛
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
AI面试、笔试、校招、雇品
HR免费试用AI面试
最新面试提效必备
登录
/
注册
首页 /
include
#
include
#
1332次浏览
96人互动
收藏话题
分享
此刻你想和大家分享什么
热门
最新
2024-03-19 02:52
张家口职业技术学院 C++
#include#
点赞
评论
收藏
分享
2024-12-10 18:42
哈尔滨理工大学 golang
include using namespace std;///////类Point//////class Point{ public: Point(int x=0, int y=0):X(x),Y(y){ cout<<"ppppppp\n"; } void setPoint(int x,int y); int getX()const{return X;} int getY()const{return Y;} void showPoint()const; protected: int X; int Y;};void Point::setPoint(int x,int y){ X=x;Y=y;}void Point::showPoint()const{ cout<<"Point:("<<<","<<<")"<
点赞
评论
收藏
分享
2024-11-29 15:59
哈尔滨理工大学 golang
includeusing namespace std;struct Person{string Name;int Total[4];//3门课程+总分 }; void sort(Person p[],int n){ Person t; for(int i=0;ip[j+1].Total[3]){ t=p[j]; p[j]=p[j+1]; p[j+1]=t;} } }}int main(){ int n; cin>>n; Person *p=new Person[n]; for(int i=0;i>p[i].Name; for(int j=0;j<3;j++){ cin>>p[i].Total[j]; p[i].Total[3]+=p[i].Total[j];} } for(int i=0;i
点赞
评论
收藏
分享
2024-03-07 22:35
西安邮电大学 C++
/*2、实现一个字符串拆分的功能, 分隔符为 ? int split(char *str, char **p); 第一个参数为要拆分的字符串,第2个参数保存数据,返回拆分了多少字段。 示例: char *arr[10]; int n = split(&quot;AB?EEEEE?BBB&quot;, arr); for (int i = 0; i < n; ++i) cout << arr[i] << endl; 输出: AB EEEEE BBB 内存自己释放*/ include #include using namespace std; int split(char *str, char **p){ int count = 0; char**q = NULL; char *token = strtok_s(str, &quot;?&quot;, q); while(token != NULL){ *(p + count) = token; token = strtok_s(str, &quot;?&quot;, q); count++; } return count; } int main(){ char str[100] = { 0 }; cin >> str; char **p = new char*[10]; memset(*p, 0, 80); int n = split(str, p); for(int i = 0; i < n; i++){ cout << *(p + i) << endl; } delete [] p; return 0; }
2024.03.07 在牛客打卡10天!
点赞
评论
收藏
分享
2024-01-20 16:11
南京信息工程大学 电气工程师
指针
当使用指针定义数组的时候,指向的文字常量不可以修改,存放在数组中的字符串是可以修改的。例如:①include<stdlib.h>int main(){char str[100]="I love C";str[0]='y';printf("str=%s\n",str);return 0;}输出:str=y love C②#include<stdio.h>#include<stdlib.h>int main(){char *str="I love C";printf("str=%s\n",str);*str='y';printf("str=%s\n",str);return 0;}输出:str=I love C后一个printf打印不出来,只能打印出第一个printf
点赞
评论
收藏
分享
2023-03-10 12:33
门头沟学院 算法工程师
//输出梯形 include int main(){ int h; while(scanf(&quot;%d&quot;,&amp;h)!=EOF){ for(int i=0;i
2023.03.10 在牛客打卡1天!
点赞
评论
收藏
分享
2022-09-07 08:08
安徽大学 前端工程师
学习一下别人代码#include(849)#include#define MAX 100000static arrtab[MAX]; //定义一个全局变量 arrtab字符数组,模拟存储栈static arrbuf = 0; //arrtab数组的下标void push(int n){if(arrbuf &lt; MAX) //检测下标是否溢出arrtab[arrbuf++] = n;}int pop(void){return arrbuf &gt; 0 ? printf(&quot;%d&quot;,arrtab[--arrbuf]) : printf(&quot;error&quot;);//使用三目运算符,返回一个printf}int top(void){return arrbuf &gt; 0 ? printf(&quot;%d&quot;,arrtab[arrbuf-1]) : printf(&quot;error&quot;);//这里要注意top和pop虽然目前的输出一样,但是的下标变化是不一样的,top是下标减1,但是实际下标不移动}int main(){int n;char s[6];scanf(&quot;%d&quot;,while(n--){scanf(&quot;%s&quot;,s);if(strcmp(s,&quot;push&quot;) == 0){int num = 0;scanf(&quot;%d&quot;,push(num);}else if(strcmp(s,&quot;pop&quot;) == 0){pop();}else if(strcmp(s,&quot;top&quot;) == 0){top();}}retu
2022.09.07 在牛客打卡2天!
点赞
评论
收藏
分享
玩命加载中
创作者周榜
更多
热议话题
更多
1
...
校招阶段,学历VS技术哪个更重要?
0
2
...
顺丰求职进展汇总
0
3
...
不卡学历的大厂有哪些?
0
4
...
腾讯音乐求职进展汇总
0
5
...
没有合适的工作,你会先找个干着,还是考公考研
0
6
...
除了主业以外,你还有哪些其他收入?
0
7
...
实习时,大家都怎么称呼自己的mentor?
0
8
...
摸鱼被leader发现了怎么办
0
9
...
视觉/交互/设计招聘信息汇总
0
10
...
社恐入职新公司如何融入团队
0
牛客网
牛客网在线编程
牛客网题解
牛客企业服务