$cat efence-p1.c #include <stdio.h> #include <stdlib.h> int main() { char *ptr = (char *) malloc(1024); ptr[0] = 0; ptr[1024] = 0; exit(0); } $gcc -g efence-p1.c -lefence $./a.out Electric Fence 2.2 Copyright (C) 1987-1999 Bruce Perens <bruce@perens.com> Segmentation fault $
Category Archives: Programming Languages
Hacking with a program which has initialization of a MYSQL object
$ls connect1-p1.c $cp connect1-p1.c connect1-p2.c $emacs connect1-p2.c $gcc -lmysqlclient -g -L/usr/lib/mysql connect1-p2.c $./a.out mysql_init failed $echo $? 1 $./a.out 2> error.txt $cat error.txt mysql_init failed $emacs connect1-p2.c $gcc -lmysqlclient -g -L/usr/lib/mysql connect1-p2.c $./a.out mysql_init failed $./a.out 2> error.txt mysql_init failed $cat error.txt $
How to write a program using ncurses library to move cursor to a point on logical screen ?
#include <unistd.h> #include <stdlib.h> #include <curses.h> int main() { initscr(); move(5,15); printw(“%s”,”Hello World”); refresh(); sleep(2); endwin(); exit(EXIT_SUCCESS); }
How to write a program which does not echo user input to the screen ?
https://raw.githubusercontent.com/ahiliation/beautifulwork-programmingpractice/master/terminals/password-p1.c
How to write a program which can print the name of the user logged in on the controlling terminal of the process ?
https://raw.githubusercontent.com/ahiliation/beautifulwork-programmingpractice/master/user-p1.c
Working With Files II
https://raw.githubusercontent.com/ahiliation/beautifulwork-programmingpractice/master/simple_write-p2.c
Working With Files I
https://raw.githubusercontent.com/ahiliation/beautifulwork-programmingpractice/master/simple_write-p1.c
Graph for Sorting Plotted using R
The following graph shows the time details to execute a sorting algorithm written in python.Array size for sort is 200. The values for plotting the above graph is taken from the following readings. Sat May 24 18:48:25 IST 2014 real 0m0.032s user 0m0.028s sys 0m0.000s real 0m0.027s user 0m0.020s sys 0m0.004s real 0m0.029s user 0m0.024s …
R shell session to plot a Graph
The following is a R shell session to plot a graph. $R R version 3.0.3 (2014-03-06) — “Warm Puppy” Copyright (C) 2014 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type ‘license()’ or ‘licence()’ for …
bubble(think so) sort in python programming language
# bubblesort attempted to be ported to python by # Jeffrin Jose T <ahiliation@yahoo.co.in> # from bubble.php by # detour@metalshell.com # License : GPL. array_size = 20; import random result = [] # hash values of numbers between -5 to 256 are the same as the # numbers themselves. So, whatever may be the …
Continue reading “bubble(think so) sort in python programming language”