## .Net Interview Questions MCQ Type

Answer” options=”View Answer” notes=”The different implementations of LINQ are: => LINQ to SQL – Refers to a component of.NET Framework version 3.5 that provides a run-time infrastructure to manage relational data as objects. => LINQ to DataSet – Refers to a component that makes it easier and faster to query over data cached in a […]

## C Program to Calculate the Sum of Digits of a given Integer

Write a program in C to calculate the Sum of Digits of a given Number

## C Program to Accept two Integers and Check if they are Equal

Write a program in C to accept two integers and check if they are equal

## C Program to Read Two Integers and Swap their Values

Write a program in C to read two integers and swap their values.

## C Program to Find the Number of Integers Divisible by 3

C Program to find number of integers divisible by 3

## C Program to Check if a given Integer is Positive or Negative

Check whether the entered number is positive or negative using C Program

## C Program to Calculate the Sum of Odd and Even Numbers

In this C Program we are going to calculate the sum of even and odd numbers in between 1 to N

## C Program to Check if a given Integer is Odd or Even

C program to check whether the input number is even or odd.

## C program to sort a list of numbers using Insertion Sort

/*Insertion sort in ascending order*/ #include<conio.h> #include<stdio.h> int main() { int n, array[100], c,d,t; printf(“Enter number of elements\n”); scanf(“%d”,&n); printf(“Enter %d integers\n”,n); for(c=0;c<n;c++) scanf(“%d”, &array[c]); for(c=1;c<=n-1;c++) { d=c; while(d>0 && array[d]<array[d-1]) { t=array[d]; array[d]=array[d-1]; array[d-1]=t; d–; } } printf(“Sorted list in ascending order:\n”); for(c=0;c<n;c++) printf(“%d\n”, array[c]); return 0; }

## C program to sort a list of numbers using Bubble Sort

#include<conio.h> #include<stdio.h> int main() { int array[100], n, c, d, swap; printf(“Enter number of elements\n”); scanf(“%d”, &n); printf(“Enter %d integers \n”,n); for(c=0;c<n;c++) { for(d=0;d<(n-c-1);d++) { if(array[d]>array[d+1]) { swap=array[d]; array[d]=array[d+1]; array[d+1]=swap; } } } printf(“Sorted list in ascending order:\n”); for(c=0;c<n;c++) printf(“%d\n”, array[c]); return 0; }

## C program to sort an array using Selection Sort

#include<conio.h> #include<stdio.h> int main() { int array[100],n,c,d,position,swap; printf(“Enter number of elements\n”); scanf(“%d”, &n); printf(“Enter %d integers\n”,n); for(c=0;c<n;c++) scanf(“%d”, &array[c]); for(c=0;c<(n-1);c++) { position=c; for(d=c+1;d<n;d++) { if(array[position]>array[d]) position=d; } if(position!=c) { swap=array[c]; array[c]=array[position]; array[position]=swap; } } printf(“Sorted list in ascending order:\n”); for(c=0;c<n;c++) printf(“%d\n”, array[c]); return 0; }

## C program to search an integer in a given list using Binary Search

C program to search an integer in a given list using Binary Search

## C program to add, subtract and multiply two complex numbers using structure

#include<conio.h> #include<stdio.h> #include<stdio.h> struct complex { int real, img; }; int main() { int choice; struct complex a,b,c; while(1) { printf(“Press 1 to add two complex numbers.\n”); printf(“Press 2 to subtract two complex numbers.\n”); printf(“Press 3 to multiply two complex numbers.\n”); printf(“Press 4 to exit.\n”); printf(“Enter your choice.\n”); scanf(“%d”,&choice); if(choice==4) exit(0); if(choice>=1 && choice<=3) { […]

## C program to multiply and subtract two matrices.

#include<conio.h> #include<stdio.h> int main() { int m,n,p,q,c,d,k,sum=0; int first[10][10], second[10][10], multiply[10][10], difference[10][10]; printf(“Enter the number of rows and column of first matrix \n”); scanf(“%d%d”, &m,&n); printf(“Enter the elements of first matrix\n”); for(c=0;c<m;c++) for(d=0;d<n;d++) scanf(“%d” &first[c][d]); printf(“Enter the number of rows and column of second matrix\n”); scanf(“%d%d”, &p,&q); if(n!=p) { printf(“Matrices with entered orders cannot be […]

## Statement Formulas

Those statements which contain one or more than one primary statements and some connectives are called molecular or compound statements.

## Connectives

In logic, a logical connective (also called a logical operator) is a symbol or word used to connect two or more sentences or statements (of either a formal or natural language) in a grammatically valid way, such that the sense of the compound sentence produced depends only on the original sentences.

## Statements

All the declarative sentences to which it is possible to assign only one truth value (true or false) are called Statements. Denoted by capital letters P, Q, etc. These statements which do not contain any connectives are called primitive sentences/statements.

## Introduction to Discrete Mathematical Logic

Aim of logic is to provide rules by which one can determine whether any particular argument or reasoning is valid.

## How to assign value to a variable and read the value in C

1 2 3 4 5 6 7 8 9 #incude<conio.h> #include<stdio.h> void main() { int n; scanf(“%d”,&n);//Assigning value to variable ‘n’ at run time printf(“%d”,n);// Reading or printing the value of ‘n’ getch(); }

## Fundamental block diagram of a computer

Input Units:
The input unit of the computer system is used for feeding data and instructions to the computer. These data and instructions given to the computer are called as input and the devices used for giving input are called input unit or devices.

## Computer Generations

The period of first generation was 1946-1959. The computers of first generation used vacuum tubes as the basic components for memory and circuitry for CPU (Central Processing Unit).

## History of Digital Computer

Before 1930 mechanical calculator were built to perform addition, subtraction, multiplication and division. The first mechanical calculators were design and built 1623 by Mr. Wilhelm Schickhard, professor at University of Tubingen.

## Boolean algebra

Boolean means a value that can be either True or False, or any other binary representation of true and false. It is simply a word for true/false (on/off) type logic and data.

## Operating System Kernel

All of the operations involving processes are controlled by a portion of the O.S. variously called its Nucleus, Core, or Kernel.

## What is Context Switching ?

When an interrupt occurs, the operating system saves the status of the interrupted process, and routes control to the appropriate first level interrupt handler. This is accomplished by a technique called Context Switching.