Sunday, 21 October 2012

Printf in C

"printf" is the common output statement used in C programming...
and printf is also a function as you may know and it returns an integer value. But we may or may not collect the return value.
It returns the number of characters to be printed..
int n;
n=printf("Hello World!");
n has got a value 12
It returns 0 if it does not print anything
if(printf(""))  // is a false condition
if(printf("HELLO")) // is a true condition
try this code..
main()
{
printf(5+"Good Morning");
}
The output is : Morning

And same is the case in scanf

Ellipsis in C

# in C is a pre processor directive..It signifies compiler action, not associated with code generation
## is used to concatinate the numbers

Ex: 3##4 gives an output 34

Ellipsis in c (...): It is used in formal argument lists of function prototypes to indicate
variable number of arguments or arguments with varying types
    void fun(int n,char ch,...)
This declaration indicates that fun will be defined in such a way that calls must have
atleast two arguments, an int and a char, but can also have any number of additional
arguments.
In c++ you can omit the comma(,) preceding the ellipsis
The point to be noted is printf works, even though we are able to pass a number of arguments to it. If we design a function which takes two arguments and pass three parameters, we would definitely get the error “too many arguments to function”

    fun(int a, int b)

    fun(2,3,4) is not possible
If printf or scanf has got variable no.of  arguments...!
The prototype of printf is
    int printf(const char *str,...)

Sunday, 14 October 2012

Alternate Office tools

Found some cool opensource alternatives for MSOffice










 This Apache Open Office contain six tools to work with.

Writer : wordprocessor

Calc : spread sheets

Draw : image application

Base : Database tool

Math to create Mathematical equations through GUI

Impress : for multimedia presentations










Libre Office have the same six tools as if in Apache Open Office.












The tools of NeoOffice are also similar to Apache Open Office

NeoOffice is  for the applications for Mac OS X

















KOffice has three main tools as an alternative for Micrsoft office

KWord : Word Processing

KCells : Spread Sheet tool

Showcase : Presentation tool


Note : All these are Opensource tools ( a reference )

Sunday, 16 September 2012

Free e- textbooks

I've just seen a site for downloading books for free..
It might be useful for students of any stream... take a look. And  the link is here
Textbooks @ Bookboon

Monday, 27 August 2012

Virtualization Softwares

Virtualization describes the separation of a resource or request for a service from the underlying physical delivery of that service.
This concept can be applied for running two or more operating systems on a system parallely..
If you install two or more Operating system in your system, and if you want to jump to another environment, you have to reboot your system.
But by using virtualization  concept, we can run the operating systems at same time side by side.
All you have to do is install virtualization softwares into your system and even the installation of operating systems is virtual.

There are both commercial and open source softwares for virtualization.

Open source softwares:
PearPC (For running Mac in Windows and Linux)

Commercial Softwares:
Simics

Some Window Shortcuts !!

win+(left / right)
This moves a restored window to left and right of the screen.
 
win+(up / down)
This minimizes and maximizes the window.  So this makes changes in size of window
 
win+M  
 minimize everything
 
alt+up,left,right 
 to navigate to parent folder or browse back and forward folders in explorer

win+home 
minimizes/restores all open windows except the active window

alt+win+#
 accesses the jump list of program number # on the taskbar

FAKE VIRUS !!!!! Shutdown and Abort


Creating a fake virus is a very easy thing to do...

Create a shortcut
type shutdown -s -t 30 -c "Virus detected"
and create it
Change the icon to any folder icon or any application icon..so that it looks more convincing for the victim..
As soon as you run it You can find an alert "Virus detected" and the system will shutdown automatically in 30 seconds.

Icon can be changed by: right click on file, properties, shortcut, changeIcon
So the 30 mentioned in the command is time in seconds
The "virus detected" message is  what I wanted to warn the user

Just give it to any of friends and look at their reaction for the fake virus alert...

And if you paste this in system32 of your windows, you can see your system shutdown in 30 seconds each time you boot your system.

Now how to abort the fake virus shutdown:

just create another shortcut and type
shutdown -a

and create the shortcut

if you run this shortcut before the system shuts down (i.e before 30 seconds in the above situation) the shutdown is aborted.
You can find a balloon message 'logging off cancelled'

Monday, 6 August 2012

Use your gmail...

Take a look at your gmail account..........
What do you think it is? a mail box...

it is more than that.. just scroll down and at the bottom of the page you can see it

The memory provided to you is 10GB all together.. and you might have used only 0.3 to 0.8 or so...
now you decide how to use your gmail account...and manage your 10GB memory..

Wednesday, 25 July 2012

Try something funny...

try this....
open gmail login page..
type your username, password
then remove the url of gmail and paste

javascript: alert(document.getElementById('Passwd').value);
and now press enter......
tell me what did you find...

(don't try dis before your friend..  :-P)

If your pc is slow

Is your pc slow when you open multiple tabs or applications??Here try this
If u want to increase the speed of your pc... here is a simple trick
You can use your pendrive as a temperory RAM and speed up your PC
insert the pendrive
right click on the drive
goto properties
select ready boost

You will have 2 options: donate the device
                                     use the device
You can select whole space or a part of it and it acts as a temporary RAM for your pc
You can defenitely find change in the speed of your computer

trojans in my lappy

j7vr4ozp16.exe
9lj08qy3mm.exe
ihka5av4.exe
zrmpa7hr45.exe
these are the trojans i found in my lappy..
They are downloaded into my system automatically when connected to internet
They run automatically at start up and increase the cpu usage...
I searched for them in web and found 2 or 3 results hardly about these...
What i saw was it is a trojan..
I too think so because its kind a malware increasing cpu usage to 100% making my sys slow...

Sunday, 3 June 2012

Hello World!

This is a small mailbox of programs..
Want to share Programs and computing concepts....