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?
 
Ad

Advertisements

Ad

Advertisements

Joined
Jul 12, 2020
Messages
22
Reaction score
2
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

Top