April 29, 2013
Return Values of printf() and scanf()
Most of people who know C Programming knows about printf( ) and scanf() functions .We start using them when we begin learning C programming just assuming they are standard input and output functions ....but when we come to learn functions ...sometimes we tend to look down upon these functions and neglect them as we have used them so many times. But that is a mistake.
printf ( ) ?
if(mistake==1)
printf("Let's correct our mistake by reading this Post");
else
printf("Just skip this post...so many posts are awaiting you");
April 26, 2013
List of Commands for RUN
The following are the list of commands you can use in your Windows 'RUN' prompt to easily open many applications.
To Open Run , you can type 'Run' in search or use the shortcut,
'window button' + R.
Then you put any of these in to that and you can get the desired output. This is the sort of like command line environment and you may think it is outdated. But, trust meonce u start using it you don't wonna stop it. Even for those who thinks 'command line' is a complete waste of time, just once start using it. It is always good to have a change over. Who knows, you may even change your mind :)
This is the list. Enjoy !!
- Administrative Tools = control admin tools
- Calculator = calc
- Command Prompt = cmd
How to add a FLYOUT menu to your blog
Now that we have seen how to add drop down menu's to our blog...if you didn't ,go checkout that using the link provided. Sometimes we want menu on the left side like 'FLY OUT' menu. So in this article we will show you how to add such fly out menu to our blog..
1) Open your Blogger dashboard click on the " TEMPLATE " button.
2) Now click on 'EDIT HTML' button beside 'Customize' button .
3)Now,click on Jump to widget on the top.
April 25, 2013
How To add an awesome DROP DOWN MENU BAR
Every body want to have their blog good looking. Drop down menu's are one of the very essential elements in this. These are very important because the first thing a user looks on your blog is the menu's. A Good and Beautiful Menu gives a good first impression for the viewer and makes him to come back to your blog again. So, here in this article we will show you how to add a beautiful and awesome looking drop down menu.Read the instructions carefully and add this Menu to your blog. Don't forget to share this article with your friends from the social tab on top.
April 24, 2013
C program for Anagram checking
The below program is to check whether two words are anagrams or not.The concept used is that we store the frequency of an alphabet in a word .By checking those counts we determine whether they are anagrams or not ....count same == anagrams.
#include <stdio.h>
#include<conio.h>
int anagramchecker(char [],char []); //declaration of funtion
int main()
{
char word1[50], word2[50];
printf("Enter first word:\n");
gets(word1);
printf("Enter second word:\n");
gets(word2);
anagramchecker(word1,word2); //calling function to check anagrams
getch(); return 0;
}
Restart Your Computer Using C Program
You can easily do all your typical system operations using C programming. This article will show
you how to restart from C programming console.
Just Compile and execute the following program.
This program calls the system function of "stdlib.h" which is used to execute shutdown.exe which is present in C:\windows\system32 in Windows XP,Windows 7. For more options take a look at this.
#include <stdio.h>
#include <stdlib.h>
main()
{
char Restart;
printf("Do you want to restart your computer now (y/n)\n");
scanf("%c",&Restart);
if (Restart== 'y' ||Restart == 'Y')
system("C:\\windows\\System32\\shutdown /r"); //for windows 7
// system("C:\\windows\\System32\\shutdown -r"); for windows xp
/* for ubuntu linux
system("shutdown -"your option") */
return 0;
}
This program calls the system function of "stdlib.h" which is used to execute shutdown.exe which is present in C:\windows\system32 in Windows XP,Windows 7. For more options take a look at this.
How To Unlock Widgets In Blogger
UNLOCK LOCKED WIDGETS
By default most of the widgets in Blogger are not locked , i.e., you can edit them by clicking on 'edit' and even remove them completely (if u want) from the 'LAYOUT' section. But You might have noticed some widgets like Navbar widget, Header widget, Attribution widget by default comes locked. So, You can't edit them directly. Here i'll show you how to UNLOCK them to make them editable and then you can do what ever you want with them.Here is a easy step wise procedure to help you through till the end.
By default most of the widgets in Blogger are not locked , i.e., you can edit them by clicking on 'edit' and even remove them completely (if u want) from the 'LAYOUT' section. But You might have noticed some widgets like Navbar widget, Header widget, Attribution widget by default comes locked. So, You can't edit them directly. Here i'll show you how to UNLOCK them to make them editable and then you can do what ever you want with them.Here is a easy step wise procedure to help you through till the end.
How To UNLOCK :
1)Open Your Blogger Dash Board and click on the 'TEMPLATE' button
Copying folders and files
#include<stdio.h>
#include<stdlib.h>
int main ()
{
int i;
printf ("\n");
i = system(" XCOPY [source path] [destination path] [options] ");
printf ("Returned value is: %d.\n",i);
return 0;
}
Copy files and/or directories to another folder. XCOPY is similar to the COPY
Know Your Current Directory | Using C Programming
The below program shows the usage of system() function to list down all the files and directories in the current directory:
#include<stdio.h>
#include<stdlib.h> //system( ) is included in this library
int main ()
{
int i;
printf ("\n");
i=system ("dir");// on windows
// i=system ("ls"); on linux or unix platforms
printf ("Returned value is: %d.\n",i);
return 0;
}
Another waySystem( ) Function in stdlib.h Library
The C library function system() passes the command name or program name specified by
a command to the host environment to be executed by the command processor. After the execution of the command it returns a value depending on the status of the execution.
Declaration:
To use this function,
Declaration:
To use this function,
int system( const char *command )
When you call this function, It will invoke the command processor to execute a command. If the command execution is terminated the processor will trasnfer the control back to the program that has called the system command.
Parameters:
String containing name of system command or requested variable.
Return Value:
It will return an integer value, but the interpretation of that is system dependant. So, on different systems it gets interpreted differently. If an error occured in the program execution, '-1' is returned, Ootherwise it returns the status of command.
Click here to know how you can restart your computer using system function.
As, always, Have a happy reading and Stay Awesome !
Parameters:
String containing name of system command or requested variable.
Return Value:
It will return an integer value, but the interpretation of that is system dependant. So, on different systems it gets interpreted differently. If an error occured in the program execution, '-1' is returned, Ootherwise it returns the status of command.
Click here to know how you can restart your computer using system function.
As, always, Have a happy reading and Stay Awesome !
-------------------------------------------------------------------------------------------------
Follow our blog posts @ Follow. So that you won't miss any interesting post and also to be the first to know the answers to many interesting questions.
Follow us on our Facebook page @ Fre Blogg
Head over to my You Tube channel for some interesting tutorials @ You Tube
April 22, 2013
Random Numbers Generation
Random Number generation is very important aspect of many games, Cryptographic key generation and for other programs with a lot of outcomes. Let us take a look at how we generate those in C language and PHP.
Before you proceed to the explanation, you need to know that a computer can never generate a Random number. It has to use some parameters to generate that number and so such numbers can never truly be Random. So, they are called Pseudo-Random Numbers and this tutorial deals with these.
We have a built-in library function namely 'int rand(void )' in C. It gives the random number between 0 and RANDMAX.
The value of RANDMAX is entirely library dependent, but it is guaranteed to be at least 32767 on any standard library implementation.
Then how to get numbers in the range we want ?
The classy part of using this operator is that the remainder is always less than divider. So, the expression "X % 101" (X is some number) gives always a number less than 101 and greater than or equal to zero.
Let's come to our question , to generate numbers in between 100(101=min) and 1000(999=max) ,we need the expression
Before you proceed to the explanation, you need to know that a computer can never generate a Random number. It has to use some parameters to generate that number and so such numbers can never truly be Random. So, they are called Pseudo-Random Numbers and this tutorial deals with these.
We have a built-in library function namely 'int rand(void )' in C. It gives the random number between 0 and RANDMAX.
The value of RANDMAX is entirely library dependent, but it is guaranteed to be at least 32767 on any standard library implementation.
Let's say we want numbers only in between 100 and 1000. It is not directly possible with rand().
We have to use some of our math skills here with the use of the operator , modulo (%).
I am very sure that you have used this operator before. It gives the remainder when one number is divided by another. (Check this tutorial if you are unsure)
The classy part of using this operator is that the remainder is always less than divider. So, the expression "X % 101" (X is some number) gives always a number less than 101 and greater than or equal to zero.
Let's come to our question , to generate numbers in between 100(101=min) and 1000(999=max) ,we need the expression
result = rand( ) % 899 +101
where 899 is max-min+1 (999-101+1).
How to make Presentations online easily
Presentations Online Made Easy
Are you Thinking about giving an online presentation so that it will be available to world outside....then this post will help you.
RVL.IO is the correct place to your presentations.It is just one way go after login. The various features it offers are....
Are you Thinking about giving an online presentation so that it will be available to world outside....then this post will help you.
RVL.IO is the correct place to your presentations.It is just one way go after login. The various features it offers are....
Easy Editior
The rvl.io editor easy to use. Presentation styles are applied to the slides even while you are editing them them so you'll know exactly what you're doing and what you are going to get as your final output.Writing and styling
There's a wide variety of themes and transitions to choose from to make sure your presentation stands out from the rest and all the things move exactly in the you wanted them to.
Why is porn so addictive ?
Why Is Pornography So Addictive ?
Have you ever wondered why Pornography is so addictive and why many people get addicted to it! You will find out everything about this during the course of this article.25% of the total search requests to any search engine is porn, though some people believe that it is a lot higher than those numbers. It is also the 4th most common reason given by people for going to the internet. Some stats even show that pornography is affecting the life of every individual on the face of the planet either directly or indirectly.
Pornography addiction is spreading like an epidemic these days. Never in the history of Internet was porn as crucial and active as is in these days and it has changed from a global phenomenon to a global problem very fast. Some stats are showing that Pornography constitutes to about Pornography is in many ways like a drug to the brain and with continuous exposure people find themselves addicted to it and their tolerance increases much like any other drug. Just like a drug it leads to the loss of control over oneself and compulsiveness to engage in the activity more despite of the negative consequences. Long term exposure may lead to permanent changes in the neural network. Dopamine (DA) is produced when ever we feel happy or accomplish something. This Dopamine sort of re-wires your brain to perform the same action again and again thus leading to addiction. So, what is produced as a New-Normal becomes more and more evident and our brain/body craves for this Dopamine to regain that new Homeostasis (the new equilibrium). This Dopamine is produced during sexual excitement and now you know the reason for addiction. Along with Dopamine some other hormones like Serotonin, Norepinephrine
The more of Pornography you watch the more Dopamine (DA) is releasedand the more you will be forced to watch again forming a 'Trap Cycle', coming out of which is very difficult. More over, the more you watch the more your tolerance increases and it becomes more difficult to get turned on by Reality. This may also lead to finding your mate less attractive.
Here Comes the GOOD NEWS. As our brain is a USE IT or LOSE IT system the addicted people still have a way out. The neural connections which you use tend to get Stronger and Stronger while those which you don't tend to get weakened and ultimately you tend to lose those qualities. So, Get more good habits and Avoid or Ignore the bad habits and you will come out of the Trap Cycle. Some experts view pornography as a dysfunctional view of society towards sexuality.
Any way now you know that Pornography become a great problem to a person and it potentially capable of getting you in to troubles. So, beware and BE AWARE. :)