what's mean by "%u" & "%p"? where to use it?

You can use %p to print the address of a variable, but it takes only (void *) as arguments. So a type cast is needed. Check this :

printf("%p", (void *)&var);

whereas %u is used to print an unsigned integer in decimal value.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.