본문 바로가기

Computer General

Switch statement Switch : it's like if and else if statement, but it is a lot more organized to work with and read int main() { using namespace std; int x; cout
Logical OR operator OR : one of those options is true, then the whole statement is true. (||) #include #include int main() { using namespace std; cout
The if Statement If : give the program an option#include int main(){using namespace std;int var = 16;if (var < 30) //if it's false not gonna run the statement{cout
Address Operator & Pointer Address Operator : it shows where in the memory the variable is stored #include int main(){using namespace std;int f = 10; //make variablesint e = 2;//output on the screen?cout
Beginning Loop repetitive task ----> use loop!#include int main(){using namespace std;int x;for(x=0;x
Beginning Arrays Array is a variable that holds a bunch of values in it.(multiple values saved in a single variable)Simple! and Useful! #include #include int main(){using namespace std;/*1. type what kind of the value of the array2. name3. square brackets--> how many values it can store*/int ages[3]; //3 onlyages[0] = 21;ages[1] = 19;ages[2] = 9;/*same as====> int ages[3] = {21,19,9};: faster, easier, and quicke..
User Defined Functions What if we make our own functions..1. First we need function prototype. It tells C++, "Hey, I will make my own function!"2. name of the function--> myfunc3. (declare the type of arguments): void myfunc(int);===> This should be above the main function4. Find the function and pretty much make the functionvoid myfunc(int x){using namespace std;cout
Beginning Math Functions We are going to use another library Then we can use all math related library provided by C++#include #include int main(){using namespace std;double num1; //real number in c++cout
How to start C++ for beginners As you might know, we should have a developing tool and a debugger in order to start to program C++.Go to google -> Find CodeBlock -> Click download -> Click Download Binary -> Download IDE binary file by different OS environment. #include // preprocessor directive ==> File!using namespace std; //standard library : another thing that is built in C++ ==> Library!int main(){ //What type of data yo..
Interview Questions) HTML part How do you optimize a website’s assets?File concatenation, file compression, CDN Hosting, offloading assets, re-organizing and refining code, etc. What are three ways to reduce page load time?Reduce image sizes, remove unnecessary widgets, HTTP compression, put CSS at the top and script references at the bottom or in external files, reduce lookups, minimize redirects, caching, etc. What kind of ..