The statement k += a; is equivalent to:
A
k = a;
B
k = k + a;
Correct answer
C
k = a + 1;
D
k = k - a;
Correct answer
B. k = k + a;
12 views
⚔️
Challenge a friend on Computer Science FBISE Class 10
Same MCQs, timed, live leaderboard. Send the link on WhatsApp – no sign-up needed.
Create challenge
Explanation
k += a is shorthand for k = k + a. Compound assignment operators like +=, -=, *= and /= save typing and make code cleaner. This is a common C syntax question.
Reference
Asked in: Matric,FBISE
Doubts & discussionNot sure why the answer is B? Ask here and get an explanation.
Ask a doubt about this MCQ
‹ Previous MCQ The format specifier %d in C is used for: Next MCQ › Which statement is used to take input from the user in C?