我需要知道二进制文件中是否包含调试符号.它是一个生产系统,因此没有像file
或objdump
或等命令gdb
.
可以在需要时提供更多信息.
操作系统:Debian
我的代码有什么问题,任何人帮助我plz.这是一个十进制到二进制的转换.根据我的代码,输出将是2为10,3为11但它输出总是添加最后一个值,如3显示1110,添加以前的输出.我现在应该怎么做 ?帮我PLZ?
#include<iostream>
#include<stdio.h>
using namespace std;
int main(){
long int decimalNumber,quotient;
int binaryNumber[100],i=0,j;
printf("Enter any decimal number: ");
//scanf_s("%ld",&decimalNumber);
while(scanf_s("%ld",&decimalNumber)==1)
{
quotient = decimalNumber;
while(quotient!=0){
binaryNumber[i++]= quotient % 2;
quotient = quotient / 2;
}
printf("Equivalent binary value of decimal number %d: ",decimalNumber);
for(j = i -1 ;j>= 0;j--)
printf("%d",binaryNumber[j]);
printf("\n");
printf("Enter any decimal number: ");
}
return 0;
}
Run Code Online (Sandbox Code Playgroud)