Interviews Questions, Algorithms, Aptitude, C Interview Program, C Theory Question, Aptitude Tricks, Test Series,

Showing posts with label C Question Group 2. Show all posts
Showing posts with label C Question Group 2. Show all posts

Tuesday, 14 May 2019

Pascal triangle

Question:

Write a program to print Pascal triangle


Solution:


Floyd’s triangle

Question:

Write a program to print Floyd’s triangle


Solution:



Diamond pattern

Question:

CASE 1:
Write a program to print Diamond pattern printing using stars

CASE 2:
Write a program to print Diamond pattern printing using numbers


Solution:

CASE 1:


CASE 2:

Solid and hollow rectangle star pattern

Question:

Write a program to print Solid and hollow rectangle star pattern


Solution:


Solid:



















Hollow :

Roots of a quadratic equation

Question:

Write a program to find roots of a quadratic equation


Solution:


The number of integers which has exactly 9 divisors

Question:

Write a program to find the number of integers which has exactly 9 divisors


Solution:

The number of times digit 3 occurs.

Question:

Write a program to find the number of times digit 3 occurs in each and every number from 0 to n


Solution:


Conversion

Question:

CASE 1:
Write a program for Binary to decimal conversion

CASE 2: 
Write a program for Decimal to binary conversion 
CASE 3:
Write a program for Binary to octal conversion 
CASE 4:
Write a program for Octal to binary conversion 
CASE 5:
Write a program for Decimal to octal conversion 
CASE 6:
Write a program for Octal to decimal conversion

Solution:


CASE 1:






CASE 2:


CASE 3:








CASE 4:













CASE 5: 

CASE 6:

Monday, 13 May 2019

Permutations

Question:

Write a program to find Permutations in which n people can occupy r seats in a classroom.

Solution:


find Number of days in a given month

Question:

Write a program to find Number of days in a given month.

Solution:


Convert digit/number to words

Question:

Write a program to Convert digit/number to words

Solution:



Quadrants in which coordinates lie

Question:

Write a program to find the Quadrants in which coordinates lie

Solution:


Maximum number of handshakes

Question:

Write a program to calculate the Maximum number of handshakes
 

Solution:



Palindromic pyramid pattern

Question:

Write a program to print Palindromic pyramid pattern printing
Solution:


Pyramid pattern

Question:

CASE 1:
Write a program to print Pyramid pattern using stars

CASE 2:
 Write a program to print Pyramid pattern using numbers

Solution:

CASE 1:



CASE 2:









Replace all 0’s with 1 in a given integer

Question:

Write a program to Replace all 0’s with 1 in a given integer

Solution:


Express a number as a sum of two prime numbers

Question:

Write a program to express a number as a sum of two prime numbers


Solution:



Armstrong numbers between two intervals

Question:

Write a program to print Armstrong numbers between two intervals

Solution:


Prime numbers in a given range

Question:

Write a program to print prime numbers in a given range

Solution: