Today I am going to give you
once again the shortcut keys of the software, which many of us may use daily it
is the 'C' while using C we use mainly keyboard nearly 90% and may be 10% using
MOUSE, to even reduce that 10% and to completely use the keyboard, I am giving
this shortcut's which may increase your working speed. So here we go for the
tour of C-program shortcut's....
-
Alt+F9 --------- Compile program
-
Ctrl+F9 --------- Run Program
-
Ctrl+F8 --------- Break Program
-
Alt+F3 --------- Close
-
Alt+F7 --------- Previous error
-
Alt+F8 --------- Next error
-
Ctrl+F2 --------- Program reset
-
Alt+F5 --------- Output screen
-
F1 --------- Help
-
F2 --------- Save file
-
F3 --------- Open file
-
F5 --------- Minimize / Maximize
-
F6 --------- Jump from one file to another
-
F7 --------- Debug
-
F8 --------- Step over
-
Alt+X --------- Exit from C
-
Shift+Del ------- Cut
-
Shift+Insert ---- Paste
-
Ctrl+Insert ----- Copy
-
Ctrl+Del -------- Clear
-
Ctrl+Y --------- Delete line
-
Ctrl+K+H ------- Deselect print
-
Alt+Bksp -------- Undo
-
Shift+Alt+Bksp -Redo
//This
program creates two vehicle objects.
using
System;
class Vehicle
{
public
int passengers, fuelcap, mpg;
}
class Twovehicle
{
static
void Main()
{
Vehicle
bus = new Vehicle();
Vehicle car = new
Vehicle();
int
range1, range2;
// Assign
values to fields in bus
bus.passengers = 25;
bus.fuelcap = 16;
bus.mpg = 21;
// Assign
values to fields in bus
car.passengers = 4;
car.fuelcap = 14;
car.mpg = 12;
//compute
the ranges assuming a full tank of gas
range1 = bus.fuelcap *
bus.mpg;
range2 = car.fuelcap *
car.mpg;
Console.WriteLine("Bus can carry " + bus.passengers + " with a range of " + range1);
Console.WriteLine("Car can carry " + car.passengers + " with a range of " + range2);
}
}
//
Pythagorean theorem to find the length of the hypotenuse given the lengths of
the two opposing sides.
using
System;
class Hypo
{
static
void Main()
{
double
x, y, z;
x = 3;
y = 4;
z = Math.Sqrt((x * x) + (y * y));
Console.WriteLine("The Hypotenuse is " +z);
}
}
- Cross-language interoperability, also called mixed-language programming.
- Full integration with the windows platform.
//This
program displays a conversion table of inches to meters and prints a blank line
after each 12 count.
using
System;
class InchtoMeterTable
{
static
void Main()
{
double
inches, meters;
int
counter;
counter = 0;
for
(inches = 1.0; inches <= 144.0; inches++)
{
//convert to meters
meters = inches /
39.37;
Console.WriteLine(inches + " inches is " + meters + " meters.");
counter++;
//Every
12th line, print a blank line.
if
(counter == 12)
{
Console.WriteLine();
counter = 0; //reset the line counter
}
}
}
}
//
Compute your weight on moon
using
System;
class
moon
{
static
void Main()
{
double earthweight; //
wieght on earth
double moonweigth; //
wieght on moon
earthweight = 165.0;
moonweigth = earthweight *
0.17;
Console.WriteLine(earthweight + " earth-pounds is equivalent to " + moonweigth +
" moon-pounds.");
}
}
/*
Program to convert Fahrenheit to Celsius */
using
System;
class FtoC
{
static
void Main()
{
double
f;
double
c;
f = 59.0;
c = 5.0 / 9.0 * (f -
32.0);
Console.Write(f + "
degrees fahrenheit is ");
Console.WriteLine(c + " degree celsius.");
}
}
Basic things that a beginners must know about C-Sharp (C#)
Java is a structured,
object-oriented language derived from c++. Java achieved portability by
translating the program’s source code into an intermediate language called
bytecode. This bytecode was then executed by the Java Virtual Machine (JVM).
Therefore, a Java program could run in any environment for which a JVM was
available.
The creation of C#:
Features that lack
Java:
This is the ability for
the code produced by one language to work easily with the code produced by
another.
Although Java programs
can be executed in a windows environment (assuming JVM has been installed), Java
and Windows are not closely coupled.
To overcome the above mentioned,
Microsoft developed C#. From C, C# derives its syntax, many of its keywords and
operators. C# builds upon and improves the object model defined by
C++.
How the Common Language Runtime
Works
The Common Language Runtime (CLR)
manages the execution of .NET code. When you compile a C# program, the output of
the compiler is not executable code. Instead, it is a file that contains a
special type of pseudocode called Microsoft intermediate Language (MSIL). MSIL
defines a set of instructions that are independent of any specific CPU. It is
the job of the CLR to translate the intermediate code into executable code when
a program is run.
MSIL is turned into executable code
using a JIT (Just in time) compiler. When a .NET program is executed, the CLR
activates the JIT compiler. The JIT compiler converts MSIL.
No comments:
Post a Comment