Join Regular Classroom : Visit ClassroomTech

interview coding questions

C program to accept three integer numbers as the length of three sides of a triangle test the validity of lengths and classify the triangle – Coding Question 5

Write a C program to accept three integer numbers as the length of three sides of a triangle , test the validity of lengths and classify the triangle. #include<stdio.h> int main() { int a,b,c; printf("n Enter the 1st Side of the triangle: "); scanf("%d",&a); printf("n Enter the 2nd Side of the triangle: "); scanf("%d",&b); printf("n […]

C program to accept three integer numbers as the length of three sides of a triangle test the validity of lengths and classify the triangle – Coding Question 5 Read More »

C program to print a pattern – Coding Question 4

Write a C program to print the following pattern(till n rows, where n is taken as input). #include<stdio.h> #include<math.h> int main() { int i,j,h,space,x=1; printf("n Enter the height: "); scanf("%d",&h); for(i=1;i<=h;i++) { printf("n"); for(space=1;space<=(h-i);space++) printf(" "); for(j=1;j<=i;j++) { printf("%d ",x); x=1-x; } } return 0; } Join Our Telegram Group Visit our Facebook Page Coding

C program to print a pattern – Coding Question 4 Read More »

check a number whether it is odd or even by bitwise operato – Coding Question 3

Write a program to check a number whether it is odd or even by bitwise operator. #include<stdio.h> int main() { int a,b; printf("n Enter the a Number: "); scanf("%d",&a); b= a & 1; // Not Necessary only to check printf("n Resultant = %d",b); // Even odd Checking if(b) printf("n %d is odd",a); else printf("n %d

check a number whether it is odd or even by bitwise operato – Coding Question 3 Read More »