Você está na página 1de 11

Speed Coding Round 1

Question 1 Write a program using conditional operators to determine whether a year entered
through the keyboard is a leap year or not.

Input Output
Enter any Year :2016 2016 is a leap Year

Question 2 Write a program that takes a character from the user and determines whether the
character entered is a capital letter, a small case letter, a digit or a special symbol.

Input Output
a Small case Letter

Question 3 Q5. A number is called a palindrome if number is equal to reverse of number e.g.
121 is palindrome because reverse of 121 is 121 itself. On the other hand 321 is not
palindrome because reverse of 321 is 123 which is not equal to 321.

Input Output
212 212 is a palindrome number

Question 4 Calculate factorial for any given number, must use recursive function.

Input Output
5 120

Question 5 Print a paramid of * using loops

Team Code: _________________ 1 of 11


Speed Coding Round 1

Question 6 Write a C program to read two numbers from user and add them using pointers.

Input Output
num1: 10 Sum = 30
num2: 20

Question 7 Write a C program to input elements in array from user and count even and odd
elements in array.

Input Output

array: 1 2 3 4 5 6 7 8 9
Total even elements: 4
Total odd elements: 5

Question 8 Write a C program to input elements in array and print all unique elements in array.

Input
array elements: 1, 2, 3, 5, 1, 5, 20, 2, 12, 10

Output
unique elements in the array are: 3, 20, 12, 10

Question 9 Write a program to identify vowel or consonant (any case can be entered)
hint: aeiou

Input Output
a vowel
b constant

Question 10 Write a C program to check whether a number is prime, armstrong, perfect number or

Input
Input any number: 11

Team Code: _________________ 2 of 11


Speed Coding Round 2
Question 1 Write a C program to delete duplicate elements from array.

Input array elements: 10, 20, 10, 1, 100, 10, 2, 1, 5, 10


Output After removing all duplicate elements
Elements of array are: 10, 20, 1, 100, 2, 5

Question 2 Write a C program to print the given X number pattern series using for loop.

Input Output
5

Question 3 Write a program to add two numbers without using plus(+) operator

Input Output
n1:4 Sum:6
n2:2

Question 4 Given age in days, covert it into Years, months & days

Input Output
12029 32 Years , 11 months, 6 days

Question 5 Write a C program to read an amount (integer value) and break the amount into
smallest possible number of bank notes.
Note: The possible banknotes are 100, 50, 20, 10, 5, 2 and 1.

3 of 11
Speed Coding Round 2

Input Output
3 Note(s) of 100.00
amount:375

1 Note(s) of 50.00

1 Note(s) of 20.00

0 Note(s) of 10.00

1 Note(s) of 5.00

0 Note(s) of 2.00

Question 6 Write a C programming to print a table


0 Note(s) of all the Roman numeral equivalents of the
of 1.00
decimal numbers in the range 1 to 50.

Output

Decimal Roman
number numeral
-------------------
1 I
2 II
3 III
4 IV
.....
98 LXXXXVIII
99 LXXXXIX
100 C

Question 7 Write a C program to read the coordinate(x, y) (in Cartesian system) and find the quadran

Input Output
Input the Coordinate(x,y): Quadrant-I(+,+)
x: 25
y: 15

Question 8 Write a program to indicate if and what profit you have made, if the cost price and
selling prices are taken as input.
Program should indicate both profit and loss.

Input Output
example 1 Cost Price: 50 You have made profit of 50
Selling Price: 100

4 of 11
Speed Coding Round 2

example 2 Cost Price: 60 You have made a loss of 10


Selling Price: 50

Question 9 Write a program to Swap varaible without using temprory varaiable

Input Output
x:10 x:5
y:5 y:10

Question 10 Write a C program to compute the sum of the two given integer values. If the two value

Input Output
example 1 x:1 ,y:2 3
example 2 x:2 ,y:2 12

5 of 11
Speed Coding Round 2

6 of 11
Speed Coding Round 2

ues. If the two values are the same, then return triple their sum.

7 of 11
Speed Coding Final Round
Question 1 Write a program using a loop that prints the following output.

Input 6
Output 122333444455555666666

Question 2 Write a C program to check which number nearest to the value 100 among two given
integers. Return 0 if the two numbers are equal.

Input Output
example 1 n1:78,n2:95 95
example 2 n1:99,n2:99 0
example 3 n1:80,n2:99 99

Question 3 Write a program using a for loop that prints the following output (you need to find a
pattern to print letters in this order):
ABDHP

Question 4 Write a program to print all permutations of a given String.

example
Input GOD

Output
GOD, "OGD", "DOG", "GDO", "ODG", and "DGO".

Question 5 An professor asked his students a simple question , that “ Is it possible to split a
single string in different chunks” an student of his class, named Alice answered , “
YES” , so the professor assign her a task to split this email address .

input array output array


“botanydept@aptechgdn.net” Department Name: botanydept
Department Site: aptechgdn
Department Domain: .net

Question 6 Linear search is very simple, to check if an element is present in the given list we
compare it with every element in the list. If it is found then we print the location at
which it occurs, otherwise the list doesn't contain the element we are searching.
Example:

8 of 11
Linear search is very simple, to check ifSpeed
an elementCoding
is present in the given list we
compare it with every element in the list. If it is found then we print the location at
Final Round
which it occurs, otherwise the list doesn't contain the element we are searching.
Example:

Question 7 In a company, worker efficiency is determined on the basis of the time required for a worker to
complete a specific job. If the time taken by the worker is between 2 – 3 hours, then the worker is
said to be highly efficient. If the time required by the worker is 3 – 4 hours, then the worker is
ordered to increase their speed. If the time taken is 4 – 5 hours, then the worker is given training
to improve his speed and if the time taken by the worker is more than 5 hours then the worker
must leave the company. If the time taken by the worker is input through the keyboard, then find
the efficiency of the worker.

Question 8 Write a program using a for loop that prints the following series.
1 2 4 8 16 32 64 128 …nth iteration

Question 9 Write a C program to check if one given temperatures is less than 0 and the other is greater than 100. Go to the edi

Output:

1
1
0

Question 10 Write a C program to find the larger value from two positive integer values that is in the ra

output:

0
30
25
28

9 of 11
Speed Coding Final Round
Question 1 Write a C program to create a new array swapping the first and last elements of a
given array of integers and length will be least 1
Output:

Elements in original array1 are: 1, 5, 7, 9, 11, 13


New array, after swapping first and last elements: 13, 5, 7, 9, 11, 1

Question 2 Write a program in C to print first 50 natural numbers using recursion.


Expected Output :

The natural numbers are : 1 2 3


4 5 6 7 8 9 10 11 12 13
14 15 16 17 18 19 20 21
22 23 24 25 26 27 28 29 30
31 32 33 34 35 36 37 38
39 40 41 42 43 44 45 46 47
48 49 50

Question 3 In a company, worker efficiency is determined on the basis of the time required for a worker to
complete a specific job. If the time taken by the worker is between 2 – 3 hours, then the worker is
said to be highly efficient. If the time required by the worker is 3 – 4 hours, then the worker is
ordered to increase their speed. If the time taken is 4 – 5 hours, then the worker is given training
to improve his speed and if the time taken by the worker is more than 5 hours then the worker
must leave the company. If the time taken by the worker is input through the keyboard, then find
the efficiency of the worker.

Question 4 Write a C program that read 5 numbers and counts the number of positive numbers and print the
average of all positive values. Go to the editor
Test Data :
Input the first number: 5
Input the second number: 8
Input the third number: 10
Input the fourth number: -5
Input the fifth number: 25
Expected Output:
Number of positive numbers: 4
Average value of the said positive numbers: 12.00

10 of 11
Speed Coding Final Round

Question 9 Write a program to identify winning prize bond by entering the number of your
series.
(14 marks) Each series has 10 bonds and the range is from 1 to 100
Govt. has issued a text file will all winning number, use that as an input and
congratulate those who won, and which of their bonds are winners.

Input Output
Starting No. 61 Congratulation you have won 4 times, you winning bonds are
63, 65, 68, 70
Ending No. 70

Question 10 Given below table Identify following words in any sequence of numbers entered (7
digits max)
(8 marks)

1 2 3
abc def
4 5 6
ghi jkl mno
7 8 9
pqrs tuv wxyz
0

INPUT: 9278324 OUTPUT: aptech matched


INPUT: 1299003 OUTPUT: nothing matched

11 of 11

Você também pode gostar