This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| int linear_search(int a[],int n,int k) | |
| { | |
| int i ; | |
| for(i=1; i<=n; i++) | |
| { | |
| if(a[i]==k) | |
| { | |
| return i; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*Total number of Odd and Even number 1D and 2D Array | |
| #include<stdio.h> | |
| int main(){ | |
| int i ,n,a[100],ev=0,od=0; | |
| printf ("Enter the array size:\n"); | |
| scanf("%d",&n); | |
| printf("Enter the element:\n"); | |
| for(i=1;i<=n;i++){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| #include<string.h> | |
| #include<stdlib.h> | |
| struct node | |
| { | |
| int data; | |
| struct node *next; | |
| }; | |
| typedef struct node Node; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include<math.h> | |
| int main() | |
| { | |
| int v,r,i=1,j,temp; | |
| char hd[100]; //Hexadecimal | |
| scanf("%d",&v); | |
| temp=v; | |
| while (temp!=0) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include<math.h> | |
| int main() | |
| { | |
| float salary,reajuste; | |
| scanf("%f",&salary); | |
| if(salary>=0 && salary<=400) | |
| { | |
| reajuste=salary * .15; | |
| salary=salary+reajuste; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Stack implement using array | |
| #include<stdio.h> | |
| #define N 5 | |
| int stack[N]; | |
| int top = -1; | |
| void push (int x) | |
| { | |
| if (top==N-1) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| #include<stdlib.h> | |
| #include<string.h> | |
| struct node{ | |
| int data; | |
| struct node *next; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| #include<stdlib.h> | |
| #include<string.h> | |
| struct node | |
| { | |
| char bookname[100]; | |
| int bookid; | |
| char aName[100]; | |
| struct node *next; | |
| struct node *pre; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| #include<stdlib.h> | |
| struct node | |
| { | |
| int data; | |
| struct node *left,*right; | |
| }; | |
| typedef struct node Node; | |
| Node *createnode(int data); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<bits/stdc++.h> | |
| #include<cmath> | |
| #include<conio.h> | |
| using namespace std; | |
| int32_t main() | |
| { | |
| int n; | |
| cin >> n; |
OlderNewer