This file contains 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
#Switched to a database | |
mysql> USE GVKCV; | |
Database changed | |
#Creating table student | |
mysql> create table student | |
-> (ROLLNO INT NOT NULL PRIMARY KEY, | |
-> NAME CHAR(10), | |
-> TELUGU CHAR(10), | |
-> HINDI CHAR(10), |
This file contains 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; | |
int main() { | |
int n{}, q{}; |
This file contains 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<conio.h> | |
#define INFINITY 9999 | |
#define MAX 10 | |
void dijikstra(int G[MAX][MAX], int n, int startnode) { | |
int cost[MAX][MAX], distance[MAX], pred[MAX]; | |
int visited[MAX], count, mindistance, nextnode, i,j; | |
for(i = 0; i < n; i++) | |
for(j = 0; j < n; j++) |
This file contains 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<conio.h> | |
#include<stdlib.h> | |
int i, j, k, a, b, u, v, n, ne=1; | |
int min, mincost=0, cost[9][9], parent[9]; | |
int find(int i) { | |
while(parent[i]) | |
i = parent[i]; | |
return i; | |
} |
This file contains 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> | |
char TorF(int i) { | |
if (i == 1) | |
return 'T'; | |
else | |
return 'F'; | |
} | |
int main() { |
This file contains 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> | |
char print(int i) { | |
if (i == 1) | |
return 'T'; | |
else | |
return 'F'; | |
} | |
int main() { |
This file contains 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 main() { | |
int i, j; // Counters | |
int r, c; | |
printf("Enter size for the sparse matrix (m * n): "); | |
scanf("%d %d", &r, &c); | |
int A[r][c]; |
This file contains 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 main() { | |
int r1, c1, r2, c2; | |
int i, j, k; /* Counters */ | |
printf("Enter size of the 1st matrix (m * n):\n"); | |
scanf("%d %d", &r1, &c1); | |
int A[r1][c1]; |
This file contains 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 *link; | |
}; | |
void printList(struct Node *head) { | |
struct Node *ptr = head; |
This file contains 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
/* WAP in 'C' to find out the union of two set */ | |
#include <stdio.h> | |
int main() { | |
int i, j, k = 0; /* Counters */ | |
int a[] = {1, 3, 5, 7, 9, 11}; | |
int b[] = {2, 4, 6, 12, 14, 16, 18, 8, 10, 12, 14, 16, 18, 20}; | |
int r[99] = {}; |
NewerOlder