Note 1
##### Take Note:

Take a note while surfing.

##### Note With Ink

Give your Note a Colorful Tag.

##### Easy to Access

Stay on same information and in Sync wherever you are.

Note 2
##### Take Note:

Organize your information,It may take Shape.

##### Easy to Access

Easy to pull up your content from anywhere anytime.

Note 3
##### Take Note:

Don't Let information to miss,Because it take shape

##### Note With Ink

Simple an Easy Way to take a note.

##### Easy to Access

Get the same in next visit.

Question :: 101
Given an unsorted array and an item K, write a program to get kth largest element.

Input : NA

Output : NA

|  Basics | | | |  Experience
``` ```
#include<iostream>#include<algorithm>using namespace std; /* Function to return k'th smallest element in a given array */int kthSmallest(int arr[], int n, int k){    /* Sort the given array */    sort(arr, arr+n);     /* Return k'th element in the sorted array */    return arr[k-1];} /* Driver program to test above methods */int main(){    int arr[] = {12, 3, 5, 7, 19};    int n = sizeof(arr)/sizeof(arr[0]), k = 2;    cout << "K'th smallest element is " <<  kthSmallest(arr, n, k);    return 0;}
``````

Question :: 102
Given a sorted array and an item k, write a program to get a pair of items whose subtraction equal to K.

Input : NA

Output : NA

|  Basics | | | |  Experience
``` ```
#include <stdio.h>
#include<iostream>
using namespace std;
/* The function assumes that the array is sorted */
bool findPair(int arr[], int size, int n)
{
/* Initialize positions of two elements */
int i = 0;
int j = 1;
/* Search for a pair */
while (i<size && j<size)
{
if (i != j && arr[j]-arr[i] == n)
{
cout<<"Pair Found: "<< arr[i]<<"and"<< arr[j];
return true;
}
else if (arr[j]-arr[i] < n)
j++;
else
i++;
}
cout<<"No such pair";
return false;
}

/* Driver program to test above function */
int main()
{
int arr[] = {1, 8, 30, 40, 100};
int size = sizeof(arr)/sizeof(arr[0]);
int n = 60;
findPair(arr, size, n);
return 0;
}
``````

Question :: 103
Write a program to delete a node in single linklist, if address of that node is given.

Input : NA

Output : NA

|  Basics | | | |  Experience
``` ```
``````

Question :: 104
Write a Program to sort the number 100001110101 in one traverse.

Input : NA

Output : NA

|  Basics | | | |  Experience
``` ```
#include<iostream>using namespace std;int main(){    int val, num, sum = 0;     cout << "Enter the number : ";    cin >> val;    num = val;    while (num != 0)    {        sum = sum + num % 10;        num = num / 10;    }    cout << "The sum of the digits of "         << val << " is " << sum;}
``````

Question :: 105
write a program to reverse all the word in given sentence . Ex. India is a Great Country. Output: aidni si a taerg yrtnuoc.

Input : NA

Output : NA

|  Basics | | | |  Experience
``` ```
#include <stdio.h>#include <string.h>#include<iostream>using namespace std;void main(){    int i, j = 0, k = 0, x, len;    char str[100], str1[10][20], temp;     cout<<"enter the string :";   cin>> str;/* reads into 2d character array */    for (i = 0;str[i] != '\0'; i++)    {        if (str[i] == ' ')        {            str1[k][j]='\0';            k++;            j=0;        }        else        {            str1[k][j]=str[i];            j++;        }    }    str1[k][j] = '\0'; /* reverses each word of a given string */    for (i = 0;i <= k;i++)    {        len = strlen(str1[i]);        for (j = 0, x = len - 1;j < x;j++,x--)        {            temp = str1[i][j];            str1[i][j] = str1[i][x];            str1[i][x] = temp;        }    }    for (i = 0;i <= k;i++)    {        cout<<str1[i];    }}
``````
Question :: 106
write a program to set the nth bit .

Input : NA

Output : NA

|  Basics | | | |  Experience
``` ```
#include <stdio.h>
#include<iostream>
using namespace std;
int main()
{
int num, n, newNum;
cout<<"Enter any number: ";
cin>>num;
/*Reads the bit number you want to set*/
cout<<"Enter nth bit to set (0-31): ";
cin>>n;
/*Right shift 1 to n times and perform bitwise OR with number*/
newNum = (1 << n) | num;
cout<<"Bit set successfully.\n\n";
cout<<"Number before setting bit: in \n"<<"in"<<num<<"is"<<n;
cout<<"Number after setting bit:" <<"in"<<newNum<<"is"<<n;
return 0;
}

``````
Question :: 107
lets 32bit no. write a program to circular rotate 1 byte. int y=0x01020304; output y=0x04010203;

Input : NA

Output : NA

|  Basics | | | |  Experience
``` ```
#include<stdio.h>
#include<iostream>
using namespace std;
#define INT_BITS 32
int leftRotate(int n, unsigned int d)
{
return (n << d)|(n >> (INT_BITS - d));
}
int rightRotate(int n, unsigned int d)
{
return (n >> d)|(n << (INT_BITS - d));
}
/* Driver program to test above functions */
int main()
{
int n = 16;
int d = 2;
cout<<"Left Rotation of" <<n<< "by "<<d<<" is ";
cout<<leftRotate(n, d);
printf("\nRight Rotation of"<<n<< "by "<<d<<" is ";
cout<< rightRotate(n, d);
getchar();
}

``````
Question :: 108
Write a program to check the bit is set or not.

Input : NA

Output : NA

|  Basics | | | |  Experience
``` ```
#include <stdio.h>
#include<iostream>
using namespace std;
void main()
{
unsigned int number;
int result, position;
cout<<"Enter the unsigned integer:\n";
cin>>number;
cout<<"enter position to be searched\n";
cin>>position;
result = (number >> (position));
if (result & 1)
cout<<"TRUE\n";
else
cout<<"FALSE\n";
}
``````
Question :: 109
Write a program to find the loop in linklist and remove the loop in linklist.

Input : NA

Output : NA

|  Basics | | | |  Experience
``` ```
``````
Question :: 110
Can you write a program to implement memcpy. copy must be successful even source and destination address overlap.

Input : NA

Output : NA

|  Basics | | | |  Experience
``` ```