Home
Blogs
Questions
Jobs
Monetize

Home

About Us

Blogs

Questions

Jobs

Monetize

Post Job

banner

Questions about compound-assignment

Read more about compound-assignment

python (65.2k questions)

javascript (44.3k questions)

reactjs (22.7k questions)

java (20.8k questions)

c# (17.4k questions)

html (16.3k questions)

r (13.7k questions)

android (13k questions)

Questions - compound-assignment

What does *= do?

Hey I am kinda new to C and I wanted to ask why this prints out 4 instead of 260? #include <stdio.h> int main() { unsigned char x = 130; x *= 2; printf("%d\n", x); }
test-img

Alpha

c

unsigned-char

integer-promotion

compound-assignment

Votes: 0

Answers: 5

Latest Answer

The *= operator is called multiplication assignment operator and is shorthand for multiplying the operand to the left with the operand to the right and assigning the result to the operand to the left....
test-img

Ted Lyngmo

Posts

Questions

Blogs

Jobs

The ultimate platform for coders and IT specialists

About

  • Company
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved