Problem Solution & Tips About Window, Linux & C, C++ Language

Tips About Window
window Logo Button + m -> To Minimize all open Program Windows & put the cursor on desktop.
window + D -> To show the desktop & open the program window.
Alt +Tab -> Use to move On program windows.

C Question and Answer

Swap two variables without using third variable.

 Answer



#include
int main(){
int a=5,b=10;
//process one
a=b+a;
b=a-b;
a=a-b;
printf("a= %d b= %d",a,b);

//process two
a=5;
b=10;
a=a+b-(b=a);
printf("\na= %d b= %d",a,b);
//process three
a=5;
b=10;
a=a^b;
b=a^b;
a=b^a;
printf("\na= %d b= %d",a,b);

//process four
a=5;
b=10;
a=b-~a-1;
b=a+~b+1;
a=a+~b+1;
printf("\na= %d b= %d",a,b);

//process five
a=5,
b=10;
a=b+a,b=a-b,a=a-b;
printf("\na= %d b= %d",a,b);
getch();

}

C Programs with Exreme outputs

1. C program without using any semicolon which output will : Hello word.

Solution:
void main(){
if(printf("Hello world")){
}
}

or

void main(){
while(!printf("Hello world")){
}
}

or

void main(){
switch(printf("Hello world")){
}
}




What is a control structure? The Type of control structure in C / C++ programming languages.

A statement used to control the flow of execution in a program or function is called control structure. The control structures in c / c++ programming language are used to combine individual instruction into a single logical unit. The logical unit has one entry point and one exit point.

The instructions in a program can be organized in three kinds of control structure to control execution flow in c / c++ programming language. All simple or complex programs can use these control structures to implement the program logic.

These control structures are three kinds.

  • Sequence Structure
  • Selection Structure
  • Repetition Structure

Problem solution of Computer languages & Linux

This blog useful to know about the languages (c,c++,Java) and Linux and Window Operating System. here i want to give some tips in window.

if u want to create a shortcut of shutdown on desktop then follow this process:

Right click on desktop ->New -> Shortcut -> (type)Shutdown -s -t 5 ->Next ->Finish.