12.30.2012

Connect MySql Database to Server

The connection of mysql database to server using object oriented concept, I uses these files:

  1. connection.php
  2. mysql.php
  3. index.php
So, Now let's start:

First of all create a root_folder that will contains all of files says: eshop
Now open your favorite text-editor like as Adobe Dreamweaver and create a php file names connection.php and save it in our root folder as eshop.

connection.php

<?php                                                   
define'DB_SERVER' , 'localhost' );
define'DB_USER' , 'root' );       
define'DB_PASSWORD' , '' );       
define'DB_NAME' , 'eshop_db' );   
?>                                  

12.29.2012

Number Rectangle

Q. Write a C program to print the following number rectangle:

1333
2222
3331

Ans.

/*c program for print number rectangle pyramid*/
#include<stdio.h>
int main()
{

12.17.2012

Number Pyramid

Q. Write a C program to print the following number pyramid:

1
123
12345
1234567

Ans.

/*c program for number pyramid*/
#include<stdio.h>
int main()
{

12.09.2012

Number Pryamid By Function

Q. Write a C program to print the following triangle using function.

 1
 2 3
 4 5 6
 7 8 9 1
 2 3 4 5 6

Ans.

/*C program for number pyramid using function*/
#include<stdio.h>
void pyramid(int );
int main()
{

12.03.2012

Character Rectangle Program


Q. Write a C program to print the following character pyramid as:

ABCD
BCDA
CDAB
DABC

Ans.

Cross-reference: Before you read answer of above program, i recommend to read Number Rectangle Program for easily understand this program.

/*c program for character pyramid*/
#include<stdio.h>
int main()

Number Rectangle Program

Q. Write a C program to print the following number pyramid as:

1234
2341
3412
4123

Ans.

/*c program for number pyramid*/
#include<stdio.h>
int main()
{

Character Pyramid Program

Q. Write a C program to print the following character pyramid C program:

ABCD

CDA
AB
C

Ans.

Cross-reference: Before you read answer of above program i recommend to read Number Pyramid Program for easily understand this program. 

/*c program for character pyramid*/
#include<stdio.h>
int main()
{

Number Pyramid

Q. Write a C program to print the following number pyramid C program:

1234
341
12
3

Ans.

/*c program for number pyramid*/
#include<stdio.h>
int main()
{

12.02.2012

Character Rectangle Design

Q. Write a C program to print the following character rectangle structure:

ABCBA
AB BA
A   A
AB BA
ABCBA

Ans.

Cross-Reference: Before you reading answer of above program, i recommend to read Number Rectangle Design for easily understand this program.

/*c program for character rectangle pyramid*/
#include<stdio.h>
int main()
{

Star Triangle Pyramid

Q. Write a C program to print the following star pyramid structure:

*********
*******
*****
***
*

Ans.

/*c program for star pyramid design*/
#include<stdio.h>
int main()
{

Number Rectangle Design

Q. Write a C program to print the following number rectangle design :

12321
12 21
1   1
12 21
12321

Ans.

/*c program for number rectangle design*/
#include<stdio.h>
int main()
{

Number Triangle Program

Q. Write a C program to print the following number triangle design:

1
232
34543
4567654

Ans.

/*c program for number triangle design*/
#include<stdio.h>
int main()
{