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<iostream> | |
#include<malloc.h> | |
struct stack | |
{ | |
int info; | |
struct stack *next; | |
}; | |
//typedef struct stack *s; |
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<malloc.h> | |
struct stack | |
{ | |
int info; | |
struct stack *next; | |
}; | |
typedef struct stack *s; | |
void push(s sptr ,int p) |
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<iostream> | |
#include<malloc.h> | |
struct stack | |
{ | |
int info; | |
struct stack *next; | |
}; | |
//typedef struct stack *s; |
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 <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"); |
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
//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++) | |
{ |
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 io.h | |
cr equ 0dh | |
lf equ 0ah | |
stack SEGMENT STACK | |
DW 100h dup(?) | |
stack ends | |
data SEGMENT |
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 io.h | |
cr equ 0dh | |
lf equ 0ah | |
stack SEGMENT STACK | |
DW 100h dup(?) | |
stack ends | |
data SEGMENT |
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
;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 |
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
;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 |
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
;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 |
OlderNewer