[go: up one dir, main page]

0% found this document useful (0 votes)
37 views3 pages

Internship 1

A pdf of questions for preparing technical internships

Uploaded by

pomeleonhitler
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views3 pages

Internship 1

A pdf of questions for preparing technical internships

Uploaded by

pomeleonhitler
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

ACROPOLIS INSTITUTE OF TECHNOLOGY AND RESEARCH

IT / CSE-DS / CSE-IoT
Internship IT/DS/IO 307

List of Program
Simple Problems
1. Write a C program to display "Hello World" on the screen.
2. Write a C program to display “Hello” followed by Your Name, Address, and City in different lines.
3. Write a C program to find the area of a circle using the formula: Area = PI*r*r.
4. Write a C program to find the area and volume of the sphere. Formulas are: Area = 4*PI*R*R Volume =
(4/3) *PI*R*R*R.
5. Write a C program to print the multiple values of two accepted numbers.
6. Write a C program to convert centigrade into Fahrenheit. Formula: C= (F-32)/1.8.
7. Write a C program to calculate simple interest.
8. Write a C program to read in a three-digit number and produce the following output (assuming that the
input is 347) 3 hundred, 4 tens, 7 units
9. Write a C program to read in a four-digit number and produce the following output (assuming that the input
is 1347) – One Thousand Three Hundred Forty-Seven.
10. Write a C program to read two integers and display one as a percentage of the other. Typically, your output
should look like 20 is 50.00% of 40 assuming that the input numbers where 20 and 40. Display the
percentage correct to 2-decimal places.
11. Write a C program to find out whether the character presses through the keyboard is a digit or not (using a
conditional operator).
12. Write a C program to swap variable values of x and y.
13. Program to swap two numbers without using a third variable.
14. Write a C program to find the maximum from the given three nos.
15. Write a C program to find that the accepted no is Negative, Positive, or Zero.
16. Write a program that reads two integer values. If the first is lesser print the message up. If the second is
lesser, print the message down if they are equal, print the message equal, if there is an error reading the
data, print a message containing the word, Error.
17. Write a C program that prints the given three integers in ascending order using if – else.
18. State the order of evaluation of the operations in each of the following C statements and implement them
to show the value of x after each statement.
a. x = 7 + 3 * 6 / 2 – 1;
b. x = 2 % 2 + 2 * 2 – 2 / 2;
c. x = (3 * 9 * (3 + (9 * 3 / (3))));
19. Write a C program that declares 5 integers, and determines and prints the largest and smallest in the group.
20. The University Grading System has the following criteria to determine the marks division. Here, the given
percentage serves as input data and the characterization as output information.
a. Percentage----Division N<5.0-----------Fail
b. 5.0<=N<5.5----Third Division
c. 5.5<=N<6.5----Second Division
d. 6.5<=N<7.5----First Division Higher----------Distinction
21. Write a C program that declares two integers, determines whether the first is a multiple of the second, and
prints the result. [Hint: Use the remainder operator.]
22. Given as input three integers representing a date as day, month, or year, print the number day, month, and
year for the next day's date. [Typical input: “28 2 1992” and Typical output: “Date following 28:02:1992
is 29:02:1992”.]
23. Write a program in C that accepts dates written in numerical form and then output them as a complete form.
Sample input: 2 26 1986 (Sample output: February 26, 1986.)
24. Write a C program for calculator designing using switch case loop?
Loops Problems
25. Program to display the first N natural number, their sum, and average.
26. Write a C program to find the sum of the first 100 odd numbers and even numbers.
27. Write a C program that will scan a number N and then output the sum of the powers from 1 to N. thus, if
the input is 4, the output should be 288. 1+4+27+256=288 [1,2,3,4]
28. Program to find whether a given number is a prime number.
29. Write a C program to display the first 100 prime nos.
30. Write a C program to find all the prime numbers between two given numbers.
31. Program to find the Factorial of a given number.
32. Program to print Fibonacci series up to N.
33. Program to display the sum of series 1+1/2+1/3+………. + 1/n.
34. Program to display series and find the sum of 1+3+5+ …….. + n.
35. Program to find whether a given number is even or odd without using the mod (%) operator.
36. Write a function myMod(a,b) to implement the functionality of mod operator(%)without using mod
operator or function. For example myMod(12,5) will return 2, myMod(12,4) will return 0 and myMod(-
12,5) will return 3.
37. Display the following output on screen (assuming the value for input parameter n=5):
a. b. c. d.
* 1 A 1
** 12 AB 23
*** 123 ABC 345
**** 1234 ABCD 4567
***** 12345 ABCDE 56789
e. f. g. h.
***** ABCDE * 1
**** ABCD *** 123
*** ABC ***** 12345
** AB ******* 1234567
* A ********* 123456789
i. j. k. l.
54321 56789 1 *****
4321 4567 12 0000
321 345 123 ***
21 23 1234 00
1 1 12345 *
m. n. o. p.
1 55555 ABCDEDCBA ABCDEDCBA
22 4444 ABCDEDCBA ABCDEDCBA
333 333 ABCDEDCBA ABCDEDCBA
4444 22 ABCDEDCBA ABCDEDCBA
55555 1 ABCDEDCBA ABCDEDCBA
q. r. &&&&&&&&& s. t. Pascal's triangle
AAAAAAAAA &&&&&&&&& &&&&&&&&& 1
AAAAAAAAA &&&&&&&&& &&&&&&&&& 1 1
AAAAAAAAA &&&&&&&&& &&&&&&&&& 1 2 1
AAAAAAAAA &&&&&&&&& &&&&&&&&& 1 3 3 1
AAAAAAAAA &&&&&&&&& &&&&&&&&& 14 6 41
AAAAAAAAA &&&&&&&&& &&&&&&&&& 1 5 10 10 5 1
AAAAAAAAA &&&&&&&&& &&&&&&&&&
AAAAAAAAA &&&&&&&&& &&&&&&&&&
AAAAAAAAA &&&&&&&&& &&&&&&&&&
&&&&&&&&&
Simple Number Problems
38. Write a C program to find the sum of digits of accepted no.
39. Write a C program to print the accepted no and it’s reverse no.
40. C program to check whether a given number is a palindrome or not. A palindrome number remains the
same when it is reversed or can be read in the same way in either direction.
41. Write a C Program to find whether the given number is strong or not? A number is called a strong number
if the sum of the factorial of its digit is equal to the number itself. Example: 145 since 1! + 4! + 5! = 1 + 24
+ 120 = 145.
42. Write C Program to add one to digits of a number. C Program that adds the 1 to every single digit of a
number, i.e., for example, 12345's output is 23456. If the digit is 9 it adds 1 and follows the carry system,
9 becomes 0, and 9's left digit adds one more 1. I.e., 3491's output is 4602.
43. C Program to check whether the given number is Armstrong number or not? Armstrong number is a number
that is the sum of its own digits each raised to the power of the number of digits. Example: 153 = 1^3 +
5^3 + 3^3.
44. C Program to check whether the given number is perfect or not? A perfect Number is a positive integer that
is equal to the sum of its proper positive divisors. For example, for 6, divisors of 6 are 1, 2, and 3. The Sum
of divisors is 1+2+3=6.
45. Write a program to convert a number into a string. For example, 1234.56 output will be One Thousand Two
Hundred Thirty-Four Rupees Fifty-Six Paise. (Max 10 Digit Number only)
46. Write a C program to print all the Factors of accepted no.
47. Program to find prime factors of a given number. For example, 45=3*3*5, 38=19*2 and 8=2*2*2.
48. Write a C program to find the GCD and LCM of two integers and output the results along with the given
integers. Use Euclid’s algorithm to find the GCD and LCM. Euclid’s algorithm uses the division algorithm
which repeatedly divides starting from the two numbers we want to find the GCD of until we get a
remainder of 0.
49. C Program to calculate the Combination and Permutations. The combination means the way of selecting a
thing or particular item from the group or sets. nCr = n!/r!(n-r)!. Permutations means possible way of
rearranging in the group or set in the particular order.
50. Program to find the value of Pi at Nth Decimal places.

You might also like