Skip to content

Instantly share code, notes, and snippets.

View tanayseven's full-sized avatar
🎯
Focusing

Tanay PrabhuDesai tanayseven

🎯
Focusing
View GitHub Profile
#include<stdio.h>
#include<iostream>
#include<malloc.h>
struct stack
{
int info;
struct stack *next;
};
//typedef struct stack *s;
#include<stdio.h>
#include<malloc.h>
struct stack
{
int info;
struct stack *next;
};
typedef struct stack *s;
void push(s sptr ,int p)
#include<stdio.h>
#include<iostream>
#include<malloc.h>
struct stack
{
int info;
struct stack *next;
};
//typedef struct stack *s;
@tanayseven
tanayseven / BubbleSort.c
Created July 26, 2012 14:40
Bubble Sort using Fork System Call in linux
#include <unistd.h>
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
pid_t pid, p;
int n, *num, i, j, temp;
pid = getpid();
printf("Parent process executing\n");
@tanayseven
tanayseven / LanguageNFA.java
Created July 30, 2012 10:18
to implement NFA for language L={aba^n U abab^n | n >= 0 }
//to implement NFA for language L={aba^n U abab^n | n >= 0 }
import java.io.*;
class LanguageNFA
{
static void checkLang(String str)
{
char foo;
int state = 0;
for(int i = 0 ; i < str.length() ; i++)
{
@tanayseven
tanayseven / countodddivide.asm
Created July 31, 2012 17:14
Count odd and even numbers using division in 8086 compatible assembly language
include io.h
cr equ 0dh
lf equ 0ah
stack SEGMENT STACK
DW 100h dup(?)
stack ends
data SEGMENT
@tanayseven
tanayseven / evenoddrotate.asm
Created July 31, 2012 17:18
Count odd and even numbers using rotate in 8086 compatible assembly language
include io.h
cr equ 0dh
lf equ 0ah
stack SEGMENT STACK
DW 100h dup(?)
stack ends
data SEGMENT
@tanayseven
tanayseven / ass1.asm
Created July 31, 2012 20:21
program to find the sum of 3 numbers and also its average using 8086 compatible assembly language
;program to find the sum of 3 numbers and also its average
INCLUDE io.h
Cr EQU 0ah
Lf EQU 0dh
data SEGMENT
p_a DB cr, lf, 'Enter a: ',0
p_b DB lf, 'Enter b: ',0
@tanayseven
tanayseven / ass2.asm
Created July 31, 2012 20:22
program to find the value of the foll. exp. (a+b)-(c+d) using 8086 compatible assembly language
;program to find the value of the foll. exp. (a+b)-(c+d)
INCLUDE io.h
Cr EQU 0ah
Lf EQU 0dh
data SEGMENT
p_a DB cr, lf, 'Enter a: ',0
p_b DB lf, 'Enter b: ',0
@tanayseven
tanayseven / ass3.asm
Created July 31, 2012 20:23
program to enter 2 nos. and check the largest of the two using 8086 compatible assembly language
;program to enter 2 nos. and check the largest of the two
INCLUDE io.h
Cr EQU 0ah
Lf EQU 0dh
data SEGMENT
p_n1 DB cr, lf, 'Enter n1: ',0
p_n2 DB lf, 'Enter n2: ',0