Question: USING THE C LANGAUGE 1 ) Printing Squares: Write a program to print out all the squares numbers that are smaller than 2018. 2) Number
USING THE C LANGAUGE 1 ) Printing Squares: Write a program to print out all the squares numbers that are smaller than 2018. 2) Number of 1's in bit string Write a program to read a number from input and counts number of '1' is its binary representation. For example, if the input is 18 then the binary representation of 18 is 10010 and hence the output should be 2. For input 8, the answer should be 1. 3) Reversing a number: Write a program to read a number from input and print out its reverse. For example, if the input is 235 then the output should be 532. If the input is 10 then the output should be 1. 4) Second Largest : Write a program to reads a set of numbers from input and compute the second largest elements from the list. Your program stops if the user enters zero. You are allowed to use all the concept we have learned so far and nothing else is necessary. For example, if the input is : 5 19 4 30 3 7 0 Then the output should be 19. 5) The output of a program : What is the output of the following piece of code? int i, x=25; for (i = 1; i < x; i++) { if ( ( x / i) > 6 ) continue; if ( i % 5) break; } printf(" %d ", i); 6) Calculate the value: A) what is the binary representation of 1055 ? B) What is the value of 14 ^ 32 (bitwise xor) C) What is the value of 12 ^ 11 (bitwise xor ) D) What is the ASCII code of 'Z' ? Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
