A Project Report On: Computer Engineering
A Project Report On: Computer Engineering
A Project Report On: Computer Engineering
BY:-
Prof. M.K.Jadhav
SVERI’S
COLLEGE OF ENGINEERING (POLY).
PANDHARPUR 2020-21
1
CERTIFICATE
Submitted by
Examiner Principal
(Prof. ) (Prof. N.D. Misal)
Date:
2
Place: Pandharpur
ACKNOWLEDGEMENT
I take this opportunity to express my sincere thanks and deep sense of gratitude to my guide,
Prof. M.K. Jadhav sir for his constant support, motivation, valuable guidance and immense help
during the entire course of this work. Without his constant encouragement, timely advice and
valuable discussion, it would have been difficult in completing this work. I would also like to
acknowledge Computer Engineering department who provided me the facilities for completion of the
project. We are thankful to him for sharing his experienced in research field with me and providing
constant motivation during entire project work.
Name of Student:-
3
“Implecet of stack using C’’
1.0 Rationale:
We had done this project of Implecet of stack help of ‘C’ language the whole project
is about to learn the techniques of Modular programs in the tabular and we learned
it. With the help of “While” loop statements we had done this with all our group
members and with the help of Turbo C++ software and Microsoft Word document
we had done this Project.
From this project we had learn how to create a Implecet of stack using ‘C’ language. By
. using different types of codes. With the help of Modular programs we create the .
. .Implecet stack with help of mainly the programs we had done the Implecet stack.
4
4.0 Literature Review:
Discuss the topic for project we have decided to generate registration form using C. But while
discussion their was another topic that is data security, So with that concept we started to design this project.
This project includes the data security as well as file handling concepts in this project. We have use class
concept for data security and ofstream and ifstream for handling the file concept. While searching their was
many project like this but their was not present one concept which we have included in this project that is
security. Which is we protect to our data.. Fstream.h is used for the file handling concept in the program.
String.h header file is used to string comparison in program.
#include<stdio.h>
void push(char element, char stack[], int *top, int stackSize){
if(*top == -1){
stack[stackSize - 1] = element;
*top = stackSize - 1;
}
else if(*top == 0){
printf("The stack is already full. \n");
}
else{
stack[(*top) - 1] = element;
(*top)--;
}
}
void pop(char stack[], int *top, int stackSize){
if(*top == -1){
printf("The stack is empty. \n");
}
else{
printf("Element popped: %c \n", stack[(*top)]);
// If the element popped was the last element in the stack
// then set top to -1 to show that the stack is empty
if((*top) == stackSize - 1){
(*top) = -1;
}
else{
(*top)++;
}
}
}
int main() {
int stackSize = 4;
char stack[stackSize];
// A negative index shows that the stack is empty
int top = -1;
5
push('a', stack, &top, stackSize);
printf("Element on top: %c\n", stack[top]);
push('b',stack, &top, stackSize);
printf("Element on top: %c\n", stack[top]);
pop(stack, &top, stackSize);
printf("Element on top: %c\n", stack[top]);
pop(stack, &top, stackSize);
printf("Top: %d\n", top);
pop(stack, &top, stackSize);
return 0;
}
Element on top: a
Element on top: b
Element popped: b
Element on top: a
Element popped: a
Top: -1
The stack is empty.
}
We have used class and object concept in this program. So we have developed the skills of
class and object. We have used fill processing also in this program that skill also we have developed
in this program. The concept of file handling we have understood very well.