有容乃大


题目:确定不同整型数据类型在内存中占多大(字节),输出不同整型数据类型在内存中占多大(字节)。

C语言:
#include
int main()
{
    printf("The size of short is %d bytes.\n",sizeof(short));
    printf("The size of int is %d bytes.\n",sizeof(int));
    printf("The size of long is %d bytes.\n",sizeof(long));
    printf("The size of long long is %d bytes.",sizeof(long long));
    return 0;
} 

python:

print("The size of short is 2 bytes.")
print("The size of int is 4 bytes.")
print("The size of long is 8 bytes.")
print("The size of long long is 8 bytes.")
Go语言:
package main

import "fmt"

func main(){
    
    fmt.Println("The size of short is 2 bytes.\nThe size of int is 4 bytes.\nThe size of long is 8 bytes.\nThe size of long long is 8 bytes.\n")
}


全部评论

相关推荐

06-13 15:45
辽宁大学 golang
咱就是说 你不主动 我也不会主动下一步hhh,急死了
恶龙战士:不建议把这种帖子发到牛客上,建议去小红书发
点赞 评论 收藏
分享
程序员牛肉:主要是因为小厂的资金本来就很吃紧,所以更喜欢有实习经历的同学。来了就能上手。 而大厂因为钱多,实习生一天三四百的就不算事。所以愿意培养你,在面试的时候也就不在乎你有没有实习(除非是同级别大厂的实习。) 按照你的简历来看,同质化太严重了。项目也很烂大街。 要么换项目,要么考研。 你现在选择工作的话,前景不是很好了。
点赞 评论 收藏
分享
06-12 16:50
已编辑
小米_软件开发(准入职员工)
晓沐咕咕咕:评论区没被女朋友好好对待过的计小将可真多。觉得可惜可以理解,毕竟一线大厂sp。但是骂楼主糊涂的大可不必,说什么会被社会毒打更是丢人。女朋友体制内生活有保障,读研女朋友还供着,都准备订婚了人家两情相悦,二线本地以后两口子日子美滋滋,哪轮到你一个一线城市房子都买不起的996清高计小将在这说人家傻😅
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务