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> | |
char value(int val) | |
{ | |
if(val>=0&&val<=9) | |
return val+'0'; | |
return val-10+'A'; | |
} | |
void convert_to(int n,int base,char *p) | |
{ |
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> | |
int len(char *str) | |
{ | |
int c=0; | |
while(*str++!='\0') | |
c++; | |
return c; | |
} | |
int count_pair(char *str,int n) |
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 qnode | |
{ | |
int data; | |
struct qnode *next; | |
}; | |
typedef struct qnode* qptr; | |
qptr front=NULL,rear=NULL; | |
int isempty(front) |
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> | |
int add(int *a,int n) | |
{ | |
int i; | |
i=n-1; | |
while(i>=0) | |
{ | |
if(a[i]&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> | |
struct tnode | |
{ | |
int data; | |
struct tnode *link; | |
}; | |
typedef struct tnode *tptr; | |
tptr insert(tptr first,int x) | |
{ |
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 tnode | |
{ | |
int data; | |
struct tnode *link; | |
}; | |
typedef struct tnode *tptr; | |
tptr insert(tptr first,int x) | |
{ |
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 tnode | |
{ | |
int data; | |
struct tnode *link; | |
}; | |
typedef struct tnode *tptr; | |
tptr insert(tptr first,int x) | |
{ |
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 tnode | |
{ | |
int data; | |
struct tnode *link; | |
}; | |
typedef struct tnode *tptr; | |
tptr insert(tptr first,int x) | |
{ |
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<iostream> | |
using namespace std; | |
class Song | |
{ | |
private:string name; | |
string composer; | |
string gener; | |
float duration; | |
int id; | |
public:Song(string name,string composer,string gener,float duration); |
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 <cmath> | |
#include <cstdio> | |
#include <vector> | |
#include <iostream> | |
#include <algorithm> | |
using namespace std; | |
void print(vector<vector<int>>mat ) | |
{ | |
int n=mat.size(); | |
for(int i=0;i<n;i++) |