1. Engineering
  2. Computer Science
  3. 2 what does the following code segment display if these...

Question: 2 what does the following code segment display if these...

Question details

2. What does the following code segment display if these inputs are entered; 234 and 76. 10 20 30 40 50 60 70 printf(Enter a positive integer> ) 80 90 100 110 120 # include<stdio.h> int main() int num; scanf (%d, &num) ; do ( printf(%d , num% 10); num = num/10; ) while (num 0) 130printf (n) 140 150 160 return 0; Note: The% operator in line 100 performs the modulus operation that returns the remainder of one number divided by another (e.g. 13% 10 is 3 and 385 is 3). (Two marks for each correct answer) 14 marks)
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution