Ads 468x60px

Friday, October 14, 2011

define in c Tutorial 2

 c preprocessor (Part 2)

 3.# undef
suppose you have something like this..

01# define x 4
02 
03# define x 5
04 
05int main(){
06 
07int z=x;
08 
09printf("%d",x); // output 5
10 
11}
although the output is 5 you can’t trust these type of declarations.If you want to redefine the same macro then first undefine it using #undef
correct way of doing
01# define x 8
02 
03# undef x // x is now unknown to compiler
04 
05# define x 9 // x is 9 now
06 
07int main()
08{
09 
10int z = x;
11 
12printf("%d",z); // output 9
13 
14}
so if you have your own macros and you are in doubt that their names can conflict with the macros defined in header files then first use # undef to undefine these macros.
1# undef conflictingname // undefining macro conflictingname in a headerfile.
2 
3# define conflictingname
4 
5int main()
6{
7// do some stuff here
8}
1# undef anyname // not an error
2int main()
3{
4// do some stuff here
5}
4.# pragma
The directive is a compiler specific directive which compiler vendors may provide .
1# pragma GCC poison x //variable cannot be used
2 
3int main(){
4 
5/*error x is poisoned .It cannot be used anywhere in GCC compiler system.*/
6 
7int x;
8 
9}
here GCC poison is called pragmas.Remember these are  compiler dependent.
So GCC poison will not work on microsoft compilers (will not give an error).You have to read manual of the compiler.
Predefined macro
1_LINE_
2_FILE_
3_TIME_
4_DATE_
5__STDC__
working example
01# define _LINE_ 98 // error predefined cannot be redefined
02int main()
03{
04// note this is __ not _
05printf("%d\n",__LINE__); // will output current line number
06printf("%s\n",__FILE__); // file name
07printf("%s\n",__DATE__); // date of execution
08printf("%s\n",__TIME__); // time of execution
09printf("%d\n",__STDC__); // Whether the compiler is standard conforming (1) or not
10}

Wednesday, October 12, 2011

Text to Image Converter tool

office Convert Word Txt to Image Jpg/Jpeg Free is a powerful and professional conversion tool, the converter produces fully functionalIMAGE documents with text, pictures, graphics etc, using the original document formatting.It can Create popular image formats as JPG,BMP,GIF,TIF,TGA,RLE,PNG,EMF,WMF from dozens of documents as Word (doc,docx,docm) rtf , Excel (xls,xlsx,xlsm), PowerPoint (ppt,pptx,pptm),txt with retaining the original style. More professional and easier interface is adaptable to everyone. You must like it as soon as you use it.


Download office Convert Word Txt to Image for Brothersoft

Features:

  • Convert Word (DOC,DOCX,DOCM), TXT, RTF to JPG,BMP,GIF,TIF,TGA,RLE,PNG,EMF,WMF.
  • Convert document to Vector format WMF.
  • Support drag and drop files.
  • Choose the entire folder to convert.
  • Intelligent processing of large files.
  • Easy to use. Convert with One Click.
  • Save the imported file list.
  • Create images with high good quality.
  • Process the conversion at very high speed.
  • It can automaticly view the output files after converted.
  • Provide the best service for you.

define in c Tutorial 1

# define a.k.a c preprocessor (Part 1)
The term can be little bit daunting but its use is very simple.It is a separate program invoked by the compiler as the first part of translation.The preprocessor can be thought as a smart editor.It Inserts,excludes,replaces text based on commands supplied by the programmer.In this case commands are made a permanent part of the source program
01/***** All are pre processor commands *****/
02# include
03# define pi 3.14
04# undef pi
05 
06/*******************************/
07int main()
08{
09// do sum stuff here
10}
for time being  do not bother what these commands do.Just see how they are used in the source program.
They are many more commands .we will see them one by one.

1) # include
The most common use of preprocessor is to include files containing declarations(header files).
#include contains declarations of all the functions used for input output.
# include will be replaced by the contents of filename.h
Ques: i have seen #include “filename.h” at many places.Is there any difference between the two?
yes there is one.
angled brackets means the preprocessor will search filename.h in standard include directory.
in my case it will be C:\Dev-Cpp\include.
if you have your file in any other location then you must specify the full path
for eg if location of file that i want to include is at “d:\folder1\filename.h” then i will write
1# include "d:\folder1\filename.h"
That is all for #include
2. # define
This is also the most widely used command plus it is risky too.
it can be used in two ways
a) to define a constant (replacement macro)
b) to simulate a function (function like macro)
first lets see a)
01# define x 123
02 
03# define y "hey"
04 
05int main(){
06 
07int i=x; //int  i=123
08 
09float j=x; // j is now 123.000000
10 
11x=5; // invalid x cannot be changed
12 
13printf(y); //
14 
15printf("%s",x);// undefined behavior
16 
17printf("%d",x);//valid
18 
19}
actually everywhere where x will appear it will be replaced by its corresponding replacement text
01# define x 123;
02 
03# define y while
04 
05int main()
06{
07 
08int i=x // valid it is equivalent to int i=123;
09 
10int a=0;
11 
12y(a<5){ //equivalent to while(a<5)
13 
14a++;
15 
16}
17 
18}
one last thing and that is very important
01# define x 10
02 
03# define y x+1 // must be # define y (x+1)
04 
05int main()
06{
07 
08int z =y*3; // equivalent to x+1*3 ==>10+1*3
09 
10printf("%d",z);// expected result 33 . Actual result 13 !
11 
12}
so always use parenthesis according to your precedence
lets look at b)
i.e how to simulate a function
simple protoype
1# define macro_name(parameter_list) (token expression)
2 
3//examples//
4# define square(x) (x*x) // there must be no space between -> macro_name and ( <-
5# define square (x)(x*x) // it is not a function like macro.It is a replacement macro
1# define square(x) (x*x) // 1st macro
2 
3int main(){
4 
5int area,length=5;
6 
7area = square(5); // 1st macro equivalent to area = (5*5)
8 
9}
1#define CALL(a, b) a b // macro
2int main(){
3 
4CALL(printf, ("%d %d %s\n",1, 24, "urgh")); // macro
5/* results in printf ("%d %d %s\n",1, 24, "urgh"); */
6}
you have to take care of the parenthesis. like
01# define square_incorrect(x) (x *x) // incorrect version
02 
03# define square_correct(x) ((x) *(x)) // correct version
04 
05int main(){
06 
07int a,b;
08 
09a=square_incorrect(3+7) // equivalent expression 3+7*3+7 result in 31 expected result 100 !
10 
11b=square_correct(3+7) // result in 100
12 
13}
There is something which i wanted to tell you.suppose you have a macro like
1# define f(x) f((x)+2)
how many times this replacement is done?
if you are replacing each time then this will go into infinite replacement
for eg
a call like this
f(2)
f((2)+2)
f(((2)+2)+2)
f((((2)+2)+2)+2)…
so these are not allowed
Note if the macro name results directly from replacement text then the replacement is not done more then one level
so the call
f(2)
f((2)+2) ->will stop here.
there is one last thing in function like macro called Stringizing
lets see what it is and how it works?
There is special treatment for places in the macro replacement text where one of the macro formal parameters is found preceded by #.the # and the token list are turned into a single string literal
01#define MESSAGE(x) printf("Message: %s\n", #x)
02 
03int main(){
04 
05MESSAGE (how are you);
06 
07/* above is equivalent to */
08 
09printf("Message: %s\n", "how are you")
10 
11MESSAGE (how are "you");
12 
13/* above is equivalent to */
14 
15printf("Message: %s\n", "how are \"you\"") // " or \ characters within the new string literal are preceded by \
16 
17}
hope you are fine until now.Rest we will see in next section.

Wednesday, October 5, 2011

Trace Cell Phone

Want to Trace Cell Phone? Are you worried that your partner is having an affair?  Do you want to find out the truth?  We have one solution: use the Trace Cell Phone feature of a great spy software program that’s foolproof and guarantees great results. Allow us to tell you what it will do for you.
SpyBubble Will Do All The Spying You Need
This program is definitely what you need in your predicament.  We highly recommend that you get your hands on it because it comes with great feedback and amazing reviews from tons of satisfied clients who have found the answer to their problem in SpyBubble.


SpyBubble can be the solution to your problem, too.  Here is what it does:
* records events on the select cell phone
* spies on all text messages (incoming plus outgoing)
* spies on web browser activities
* checks call logs
* uses GPS location to track phone owner
* offers complete phone book access
* provides global worldwide application
* covers you with 100% undetectability
* gives spy access to unlimited cell phones
As you can see, you will be able to trace cell phone activities of your partner without him or her being able to trace you!  You can do this both domestically or abroad, anywhere in the world!  This feature will be of great use to you especially if your partner travels often.
Why Is SpyBubble So Highly Recommended?
It delivers what it promises.  This is confirmed by the myriads of impressive feedback from satisfied customers who have tried and proven this great spy software program.
Do not waste your time looking elsewhere as we guarantee you will not find another program like this.
The truth is that SpyBubble takes over for you and literally becomes your eyes and ears, gathering all sensitive and accurate information you need.  Better still,  it keeps you safe and secure and exempt from being found out.
It allows you to remain low key and under the radar while it uses all its scientific satellite capabilities to do its job on your behalf.  It’s a veritable scientific wonder!
Why don’t you take a look at this software program? Visit: Spybubble
So, if you are serious about beginning your trace cell phone project, trust the expert and get SpyBubble right away. We highly recommend it and would refer and trust it even to our immediate, personal family members regardless of how sensitive the specific circumstance.
Get your online copy of SpyBubble right now by clicking the button and be on your way to successfully carrying off your trace cell phone pet project conveniently at your leisure from the comfort of your own home.
SpyBubble is so convenient that you will not have to neglect your family members and responsibilities. Get it now!
So, do you want to easily start tracing any cell phone? Visit: How To Trace A Cell Phone

Sunday, October 2, 2011

Tapping Cell Phones – Easily Tap Any Cell PhoneMany people often wonder if Tapping Cell Phones is ethical or moral. There are a number of reasons why someone would want tap the calls of another person. They could be for business or personal reasons. If you have a business, you may want to know if a person is using company resources for his or her personal gain. It could also be that your spouse or partner is having second thoughts about the relationship. Your child may be having difficulties in their life that they just don’t feel they can openly talk about. Is it possible to tap cell phones? You probably know by now that it is possible to tap land line connections. With the advancement in technology, especially with the internet, many different types of software have been created to address different challenges and issues that are faced daily. To answer your question, yes, it is possible. Here’s what you will need to do: You need to prepare a few things before you can start tapping a cell phone. * You need to have a pc with a good internet connect, probably DSL or cable. * You need to have access to the cell phone you want to tap. * You will need to download a mini-application that will need to be installed on the phone you want to tap into. The next thing you will need to do is get the phone setup so that you can start monitoring the calls. Here’s how: 1. This may be the challenging part, but you will need to have access to the phone you are trying to tap into. You will only need access this one time. 2. Install the program on the cell phone and restart it. 3. Use an online application that will allow you to track the different activities of the phone. Using a robust, undetectable piece of software for easily Tapping Cell Phones. When you start using the software you’ll find out that you have a wealth of resources. You will be able to track incoming/outgoing calls and text from any computer. You just need to have access to any computer and within seconds you will know exactly what has been said in any text or call. You will also have logs for evidence if you need to take any action. Why don’t you have a look for yourself at the phone application that has helped many people find out the truth? Visit: Tapping Cell Phones. If you’ve made the decision to start monitoring someone’s calls, you need to have access to a computer with internet, install a phone application on a target cell phone and regularly check the different calls or texts online. How badly do you want to start monitoring those calls? Visit: Tapping Cell Phones.

Many people often wonder if Tapping Cell Phones is ethical or moral. There are a number of reasons why someone would want tap the calls of another person. They could be for business or personal reasons. If you have a business, you may want to know if a person is using company resources for his or her personal gain.
It could also be that your spouse or partner is having second thoughts about the relationship. Your child may be having difficulties in their life that they just don’t feel they can openly talk about.

Is it possible to tap cell phones?
You probably know by now that it is possible to tap land line connections. With the advancement in technology, especially with the internet, many different types of software have been created to address different challenges and issues that are faced daily. To answer your question, yes, it is possible. Here’s what you will need to do:

You need to prepare a few things before you can start tapping a cell phone.
*     You need to have a pc with a good internet connect, probably DSL or cable.
    You need to have access to the cell phone you want to tap.
*     You will need to download a mini-application that will need to be installed on the phone you want to tap into.
The next thing you will need to do is get the phone setup so that you can start monitoring the calls. Here’s how:
1. This may be the challenging part, but you will need to have access to the phone you are trying to tap into. You will only need access this one time.
2. Install the program on the cell phone and restart it.
3. Use an online application that will allow you to track the different activities of the phone.
Using a robust, undetectable piece of software for easily Tapping Cell Phones.
When you start using the software you’ll find out that you have a wealth of resources. You will be able to track incoming/outgoing calls and text from any computer. You just need to have access to any computer and within seconds you will know exactly what has been said in any text or call. You will also have logs for evidence if you need to take any action.
Why don’t you have a look for yourself at the phone application that has helped many people find out the truth? Visit: Tapping Cell Phones.
If you’ve made the decision to start monitoring someone’s calls, you need to have access to a computer with internet, install a phone application on a target cell phone and regularly check the different calls or texts online.
How badly do you want to start monitoring those calls? Visit: Tapping Cell Phones.
Related Posts Plugin for WordPress, Blogger...
 

Sample text

Sample Text