+ 12
What is the function of %x in this code? C language!😗
#include <stdio.h> int main() { int i = 0; printf("The address of i is %x\n", &i); test(i); printf("The address of i is %x\n", &i); test(i); return 0; } void test(int k) { printf("The address of k is %x\n", &k); } my question is why this (%x) is not printed as text ?
7 ответов
+ 19
It is the format specifier
it tells in what format u want the value of k
%x = hexadecimal format
%d = decimal
%f = float
%c = character
%s = string... etc...
+ 7
%x is a request to display the next argument in hexadecimal.
+ 7
####
%x is a hexa decimal format. so this text is not printed.
+ 1
i guess its a function other than main,... keep doing courses u will learn
0
it is a format specifier . It tells about the k value is in hexadecimal format. so it is not printed.
0
ok thanx
- 1
what is test() ?