Skip to content

Instantly share code, notes, and snippets.

View thecoducer's full-sized avatar
🐳
learning & unlearning

Mayukh Datta thecoducer

🐳
learning & unlearning
View GitHub Profile
@thecoducer
thecoducer / stack.c
Last active August 17, 2017 05:05
stack
#include<stdio.h>
#include<stdlib.h>
#define MAX 3
typedef struct stack //globally declared structure
{
int array[MAX];
int top;
}stack;
stack s; //s is a global variable of datatype stack
import java.util.*;
public class Main
{
public static void main()
{
System.out.println(“Hello, World!”);
}
}
#include<stdio.h>
main()
{
printf(“Hello, World!”);
}
print(“Hello, World!”)
println "Hello, World"; //semicolons are optional
//take two variables x and y
//x is an integer and y is a float
x=50
y=29.3
//declare an array name, arr, with 3 elements
//first is a string, second is a function, third is a float
//because third is the sum of x and y, must be float
arr=<"I'm Mayukh", nimo[]{println "Hello"}, x+y>;
//running a loop
/**
Author:- Mayukh Datta
**/
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define H 7
#define W 8 //one extra room in the char array is required for storing '\0'
void main()
{
//Language:- C
#include<stdio.h>
#include<stdlib.h>
#define MAX 3
typedef struct stack //globally declared structure
{
int array[MAX];
int top;
}stack;
//Language:- C
#include<stdio.h>
#include<stdlib.h>
typedef struct node
{
int data;
struct node *next;
}node;
//Language:- C
#include<stdio.h>
#include<stdlib.h>
typedef struct node //globally declared structure
{
int data;
struct node *next; //self-referencing pointer, to know more refer C programming book by D. Ritchie
}node;