Skip to main content

Posts

Showing posts with the label c programs for interview

Technical Interview - C Programs Frequently Asked In Interviews.

C Programs Frequently Asked In Interviews. This section covers C programs often asked in campus interviews and freshers walk-in. It helps job seekers who are about to attend TECHNICAL interview round . Here you will find simple C programming questions with answers basically asked in technical interviews. 1) C Program To Print A Message. 2) C Program To Read Two Numbers And Print The Sum Of Given Two Numbers. 3) C Program To Accept Student Roll No, Marks in 3 Subjects and Calculate Total, Average and Print it. 4) C Program To Read Three Numbers And Print The Biggest Of Given Three Numbers. 5) C Program To Read A Number And Find Whether The Given Number Is Even Or Odd. 6) C Program to accept a year and check whether the given year is a leap year or not. 7) C Program to print sum of individual digits of given number. 8) C Program to accept a three digit number and print the sum of individual digits. 9) C Program to accept a number and check the given number is Armstron...

C Program To Find Prime Number Between 1 And 100.

34) Sample C Program to print prime numbers between 1 to 100. # include <stdio.h> # include <conio.h> main( ) { int n, i, check; clrscr(); for(i = 1; i <= 100; i++) { check = 1; for(n = 2; n <= i / 2; n++) if(i % n == 0) { check = 0; break; } if(check == 1) printf("\n %d is a prime", i); else printf("\n %d is not a prime", i); } getch( ); } 35) Sample C Program to accept two numbers and print sum of two numbers by using functions. # include <stdio.h> # include <conio.h> main( ) { int a, b, c; clrscr(); printf("Enter the value for a:") scanf("%d",&a); printf("Enter the value for b:") scanf("%d",&b); c = add(a, b); printf("Sum of two numbers is %d",c); getch( ); } int add(int x, int y) { int z; z = x + y; return z; } 36) Sample C Program to accept a number and find factorial of given number. # include <stdio.h> # incl...