Follow

This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Translate

Saturday, April 30, 2016

/* Another Methods of Traversing in a Linear Array  */

#include<stdio.h>         /* Header File that are called standard input output*/
#include<conio.h>        /* Header File that are called consol input output*/

void main(){       /*start the main function and void that are not return type*/

clrscr();            /* Clear the screen at every time when input new element*/

int LA[] = {20, 65, 73, 88, 33, 95, 25};   /*array that will be stored 5 element*/ 

int k,count =0, LB=0,UB=7;    /*only declare that are integer variable*/
k=LB;
printf("\nThe array contain.....\n");/*Only for print that mean get the output  */

for(k=LB;k<UB;k++){                       /*that are loop k=0,UB=5*/
printf("%d\t", LA[k]);
k++;                           /*increase the loop element */
count++;                  /*to be increase for counting in the array*/

printf("\n\n The number of elements=%d", count);  /* Count the element of array */
getch();   /*keep to stay the screen*/   
}


            index=0,1,2,3,4 there are 5 index element since, there have 5 element that are 5,6,7,8,3
                        0 1 2 3 4

Note:    0=5,1=6,2=7,3=8,4=3

So, when 0<5 that are condition is true and print 0 index that are mean 5 print stil condition 4<5 will be print that are 3 element and next condition 5<5 that are false condition and exit loop.
Here, when print o index and increase the value of loop the 1 and continue 4 and will be exit loop when value is 5.

If You want to learn about the technology, computer science & engineering, web programming, freelancing, earning please click here :CSE SOLVE

Traversing in a Linear Array

/* Traversing in a Linear Array  */

#include<stdio.h>         /* Header File that are called standard input output*/
#include<conio.h>        /* Header File that are called consol input output*/

void main(){       /*start the main function and void that are not return type*/

clrscr();            /* Clear the screen at every time when input new element*/

int LA[] = {5,6,7,8,3};   /*array that will be stored 5 element*/ 

int k,count =0, LB=0,UB=5;    /*only declare that are integer variable*/
k=LB;
printf("\nThe array contain.....\n");/*Only for print that mean get the output  */

while(k<UB){                       /*that are loop k=0,UB=5*/
printf("%d\t", LA[k]);
k++;                           /*increase the loop element */
count++;                  /*to be increase for counting in the array*/

printf("\n\n The number of elements=%d", count);  /* Count the element of array */
getch();   /*keep to stay the screen*/   
}


            index=0,1,2,3,4 there are 5 index element since, there have 5 element that are 5,6,7,8,3
                        0 1 2 3 4

Note:    0=5,1=6,2=7,3=8,4=3

So, when 0<5 that are condition is true and print 0 index that are mean 5 print stil condition 4<5 will be print that are 3 element and next condition 5<5 that are false condition and exit loop.
Here, when print o index and increase the value of loop the 1 and continue 4 and will be exit loop when value is 5.

If You want to learn about the technology, computer science & engineering, web programming, freelancing, earning please click here :CSE SOLVE

Procedure P2.9A : CROSSOUT(A, N, K)

1.  If A[K] = 1, then : Return.

2.  Repeat for L = 2K to N by K:

Set A[L] : 1.

[End of loop]

3. Return.
If You want to learn about the technology, computer science & engineering, web programming, freelancing, earning please click here :CSE SOLVE

Complexity;Space-Time Tradeoffs

Briefly describe the notations of (a) the complexity of an algorithm and (b) the space-time tradeoff of algorithms  :

(a)  The complexity of an algorithm is a function f(n) which measures the time and/or space used by an algorithm in terms of the input size n.

(b) The space-time tradeoff refers to a choice between algorithmic solutions of a data processing problem that allows one to decrease the running time of an algorithmic solution by increasing the space to store the data and vice versa.
If You want to learn about the technology, computer science & engineering, web programming, freelancing, earning please click here :CSE SOLVE

Friday, April 29, 2016

Program to convert an Expression from Infix to Postfix

#include<stdio.h>
#include<stdlib.h>

#define MAXCOLS 80
#define TRUE 1
#define FALSE 0

void postfix(char*, char *);
int isoperand(char);
void popandtest(struct stack*, char*, int*);
int prcd(char, char);
void push(struct stack*, char);
char pop(struct stack*);


void main(){
char infix[MAXCOLS];
char postr[MAXCOLS];
int pos = 0;

while ((infix[pos++] = getchar()) != '\n' );
infix[--pos]='\0';
printf("%s%s", "the original infix expression is", infix);
postfix(infix, postr);
printf("%s\n", postr);
}   /* end of main */
If You want to learn about the technology, computer science & engineering, web programming, freelancing, earning please click here :CSE SOLVE

Using One-Dimensional Arrays Of C Programming Language

#define NUMELTS 100
void main(){
  
     int num[NUMELTS ];                        /*   array of numbers     */
    int i;
    int total;                                            /*   sum of the number     */
    float avg;                                         /* average of the number  */
    float diff;                                        /*  number and the average */
   
total = 0;
for(i=0; i<NUMELTS; i++){
/*   read the numbers into the array and add them    */ 
scanf("%d", num[i]);
total +=num[i];   
} /* end for  */ 

avg  = (float)total/NUMELTS;                /* computer the average */
printf("\nnumber difference");      /*    print heading   */
/   * print each number and its difference      */

for(i = 0; i<NUMELTS; i++){
 diff = num[i]-avg;
printf("\n%d%f", num[i], diff);

}   /*  end for  */

printf("\naverage is : %f", avg );
}   /* end main */

Learn More from Blog :  

Expert Web Engineering

Expert Computer Networking

Talent Programming Language C

Logical Discrete Mathematics

Expert Compiler Design

Professional Algorithm Design

Professional Responsive Web Page Design By Bootstrap

Talent Software Engineering
If You want to learn about the technology, computer science & engineering, web programming, freelancing, earning please click here :CSE SOLVE

Thursday, April 7, 2016

Evaluation of Postfix Expression

Evaluation of Postfix Expression : 

Algorithm : 

1. Add a right parenthesis ")" at the end of P.   [This acts as a sentinel]

2. Scan P from left to right and repeat Steps 3 and 4 for each element of P until the sentinel ")" is encountered.

3. If an operand is encountered, put it on STACK.

4. If an operator  is encountered, then :

(a) Remove the two top elements of STACK, where A is the top element and B is the next-to-top element..

(b) Evaluate B A

(c) Place the result of (b) back on STACK.

[End of If structure.]
[End of Step 2 loop.]

5. Set VALUE equal to the top element on STACK.

6.Exit.
If You want to learn about the technology, computer science & engineering, web programming, freelancing, earning please click here :CSE SOLVE

Arithmetic Expressions;Polish Notation

Arithmetic Expressions;Polish Notation : 


Highest : Exponentiation

Next Highest : Multiplication (*) and Division(/)

Lowest : Addition(+) and Subtruction(-)
If You want to learn about the technology, computer science & engineering, web programming, freelancing, earning please click here :CSE SOLVE