Unsigned long problem in c coding

Joined
Jul 31, 2019
Messages
2
Reaction score
0
Hi all,
I found these lines of code in one of the c file.
int main()
{
unsigned long a;
a= fun(1000);
return 0;
}

unsigned long fun(unsigned long ms)
{
unsigned long us = ms * 10L;
return us;
}

can anyone explain the value of a which is printed after computing its value?
 
Joined
Jul 12, 2020
Messages
89
Reaction score
9
seems like a portion of a class object code... it basically states that the variable "a" = 1000 * 10L ; whatever 10L means. I've never seen that before. 10L could be another variable posted somewhere else in the code and mean something 10L = 2. Then it would be 1000 * 2.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,060
Latest member
BuyKetozenseACV

Latest Threads

Top