# CPP Questions for School Competition

List of C++ questions for Inter School based programming competition. This list of CPP question will help you to challenge your existing skill.

IN most of these interschool competitions, The whole competitions is divided into two or three round. So we have decided to divide the whole list according to the round.

Round -0 is basically used to eliminate the extra candidates from the competitions and contains the basic questions based on looping and array.

# Round -0

Q1.         Write a program in  C++  to convert a binary number into decimal number

Q2          Write a program in C++ to convert a decimal number into binary number

Q3.         Write a program in C++ to print the following pattern on the screen

1

1 2 1

1 2 3 2 1

1 2 3 4 3 2 1

1 2 3 4 5 4 3 2 1

1 2 3 4 3 2 1

1 2 3 2 1

1 2 1

1

Q4.         Write a program to read a string and output whether it is a valid or invalid identifier. Each string will be 10   characters or less in size.

Q5.         Write a program in C++ to print parallelogram words.  (Output a given word horizontally and multiple times vertically so that each letter in the horizontal word matches the position of that letter vertically. )

Example

T

TE

TES

TEST

EST

ST

T

Q6.   Write a program to find out whether each left parenthesis ‘(‘ has a matching ‘)’ right parenthesis.

# Round – 1

Q1.         Write a program in C++ to print all the prime Numbers between 100  to 1000

Q2          Write a program in C++ to find out all the Armstrong numbers between 100- 500

Q3          Write a program to reverse every word of a given string

Q4.         Write a program in C++ to delete a given word from a given string ( if available)

Q4.         Write a program in C++ to delete all the repeated word in a string.

Q5.         Write a program in C++ to delete all the repeated numbers in an array

Q6.         Write a program in C++ to find out the largest and smallest word in any given string.

Q7          Write a C++ Program to Display every possible Combination of two Words or Strings from the input Strings without Repeated Combinations

Q8.         Write a C++ program that takes input as 2323 and gives output as 2332. ie. the new number should be greater than the previous number but should have the same digits

Q9          Write a program in C++ to sort all the words of a string and display them on the screen.

Q10.       Write a program in C++ to find out the count of number of 1 letter word, 2 letter word, 3 letter word and so       on from a sentence.

# Round – II

Q1.         Write a Program in C++ that reads a string from keyboard and convert that string into its equivalent pig-latin string.

Q2.         Write a program in C++ to create a magic square of  3×3  so that the sum of each row / column/diagonal is 15 . You are only allowed to use a digit between 1-9 only once.

Q3.         Write a program in C++ to convert any number into its equivalent Words

Example :

12,324     is  – Twelve thousand three hundred and twenty four.

Q4.         Write a program to calculate the difference between two valid dates in days, month and year.

These CPP questions for school competitions is based on the competitions held at different school for inter school CPP programming.