Skip to content

Instantly share code, notes, and snippets.

💭
Building BrowserStack

Rajendra kadam raju249

💭
Building BrowserStack
  • BrowserStack
  • Mumbai
Block or report user

Report or block raju249

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View stack.c
/*
Own code implementated by Rajendra Kadam
Source code is available for download on my website
link: iamrajendra.pythonanywhere.com
*/
#include <stdio.h>
View delete.c
/**
* Tries to delete a number.
*/
void delete(void)
{
// prompt user for number
printf("Number to delete: ");
int n = GetInt();
// get list's first node
View search.c
/**
* Searches for a number in list.
*/
void search(void)
{
// prompt user for number
printf("Number to search for: ");
int n = GetInt();
// get list's first node
View insert.c
/**
* Tries to insert a number into list.
*/
void insert(void)
{
// try to instantiate node for number
node* newptr = malloc(sizeof(node));
if (newptr == NULL)
{
return;
View traverse.c
/**
* Traverses list, printing its numbers.
*/
void traverse(void)
{
// traverse list
printf("\nLIST IS NOW: ");
node* ptr = first;
while (ptr != NULL)
{
View main.c
// main entry point for program
int main(void)
{
int c;
do
{
// print instructions
printf("\nMENU\n\n"
"1 - delete\n"
"2 - insert\n"
@raju249
raju249 / linkedlist.c
Last active Aug 29, 2015
A linked list in C
View linkedlist.c
// This is the code for linked list in C.
// This includes functions for insert,delete,search and traverse
// I used the distribution code from my course CS50 by Porf.David.J.Malan
#include <cs50.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
// Defines a node for linked list
typedef struct node
You can’t perform that action at this time.