Especially for Sagarmatha Engineering college
This repo contains C programs that need to be run on practical classes . These are the codes present in the sheets given during practical or the codes you have to write.
- Each sheets have corresponding
SHEET-nfolder. Click me for note - The Questions given in sheet are named as
Q-n.C. - The Sub-questions are named as
Q-n-X.C. - The answers to Write a program are named as
Q-n-A.C. - The code for programs that contains errors and are needed to be analyzed are named as
Q-n-X-N.C
The programs written are solely compatible in
Turbo C++,an old stupid program for today's world. Hence program contains weird things like:
#include <conio.h>
void main(){
clrscr(); // what ??
getch(); // To terminate the running program ??? LoL
}Hence avoid using editors like
code::blocks,geanywhich use compilers likegcc,mingw
I have commented out all those weird things . And also :
void main(){
}has been replaced by :
int main(){
return 0;
}Obvious but still! Who knows?
- If you really want to run it in such editors or use other compilers, While compiling/building avoid strict compile check flags like
-Wallingcc,
gcc -o-Wall"output-file" "file.c"
- Omit
#include <conio.h>that won't work , - Omit
getch(),clrscr(); void main()works good if you remove strict flag.- Even after doing all this,
TurboC++gives different result while doing complex operator precedence problems like :c = b++ - --a + ++a - --b + a * bLoL
note :
nrepresents number. Example 1,2,3.Xrepresents sub questions that are usually written in roman . Example : I,IINrepresents analytical questions that contains error by design.BCTrepresents Bachelors in computer engineering (group).