This is just concept of the Apple iPhone 6. . .
This blog will helpful for computer science and engineering and information technology students. They can easily upgrade their Technical knowledge.
Saturday, 28 September 2013
CHECK RAIN IN YOUR CITY ???
Now Check Rain In Your City ? ... Try it
sraining.in, which serves for nothing saying whether or not it's raining in a given city at this very moment (it also shows the current weather conditions)
First Goto
http://isitraining.in/
Type in the name of your city and hit Enter
See the your City rain and Weather result
Its raining Your City Result "YES" Other Wise "No"
sraining.in, which serves for nothing saying whether or not it's raining in a given city at this very moment (it also shows the current weather conditions)
First Goto
http://isitraining.in/
Type in the name of your city and hit Enter
See the your City rain and Weather result
Its raining Your City Result "YES" Other Wise "No"
Friday, 27 September 2013
How to find the IP address of the sender in Gmail.
When you receive an email, you receive more than just the message. The email comes with headers that carry important information that can tell where the email was sent from and possibly who sent it. For that, you would need to find the IP address of the sender. The tutorial below can help you find the IP address of the sender. Note that this will not work if the sender uses anonymous proxy servers.
Finding IP address in Gmail:
1.Log into your Gmail account with your username and password.
2. Open the mail.
3. To display the headers,
* Click on More options corresponding to that thread. You should get a bunch of links.
* Click on Show original.
4. You should get headers like this:Gmail headers : nameLook for Received: from followed by a few hostnames and an IP address between square brackets. In this case, it is 65.119.112.245.That is be the IP address of the sender!
5. Track the IP address of the sender.
Finding IP address in Gmail:
1.Log into your Gmail account with your username and password.
2. Open the mail.
3. To display the headers,
* Click on More options corresponding to that thread. You should get a bunch of links.
* Click on Show original.
4. You should get headers like this:Gmail headers : nameLook for Received: from followed by a few hostnames and an IP address between square brackets. In this case, it is 65.119.112.245.That is be the IP address of the sender!
5. Track the IP address of the sender.
WPF vs WinForms
In the previous Post, we talked about what WPF is and a little bit about WinForms. In this Post, I will try to compare the two, because while they do serve the same purpose, there is a LOT of differences between them. If you have never worked with WinForms before, and especially if WPF is your very first GUI framework, you may skip this chapter, but if you're interested in the differences then read on.
The single most important difference between WinForms and WPF is the fact that while WinForms is simply a layer on top of the standard Windows controls (e.g. a TextBox), WPF is built from scratch and doesn't rely on standard Windows controls in almost all situations. This might seem like a subtle difference, but it really isn't, which you will definitely notice if you have ever worked with a framework that depends on Win32/WinAPI.
A great example of this is a button with an image and text on it. This is not a standard Windows control, so WinForms doesn't offer you this possibility out of the box. Instead you will have to draw the image yourself, implement your own button that supports images or use a 3rd party control. With WPF, a button can contain anything because it's essentially a border with content and various states (e.g. untouched, hovered, pressed). The WPF button is "look-less", as are most other WPF controls, which means that it can contain a range of other controls inside of it. You want a button with an image and some text? Just put an Image and a TextBlock control inside of the button and you're done! You simply don’t get this kind of flexibility out of the standard WinForms controls, which is why there's a big market for rather simple implementations of controls like buttons with images and so on.
The drawback to this flexibility is that sometimes you will have to work harder to achieve something that was very easy with WinForms, because it was created for just the scenario you need it for. At least that's how it feels in the beginning, where you find yourself creating templates to make a ListView with an image and some nicely aligned text, something that the WinForms ListViewItem does in a single line of code.
This was just one difference, but as you work with WPF, you will realize that it is in fact the underlying reason for many of the other differences - WPF is simply just doing things in its own way, for better and for worse. You're no longer constrained to doing things the Windows way, but to get this kind of flexibility, you pay with a little more work when you're really just looking to do things the Windows way.
The following is a completely subjective list of the key advantages for WPF and WinForms. It should give you a better idea of what you're going into.
WPF advantages.
It's newer and thereby more in tune with current standards
Microsoft is using it for a lot of new applications, e.g. Visual Studio
It's more flexible, so you can do more things without having to write or buy new controls
When you do need to use 3rd party controls, the developers of these controls will likely be more focused on WPF because it's newer
XAML makes it easy to create and edit your GUI, and allows the work to be split between a designer (XAML) and a programmer (C#, VB.NET etc.)
Databinding, which allows you to get a more clean separation of data and layout
Uses hardware acceleration for drawing the GUI, for better performance
It allows you to make user interfaces for both Windows applications and web applications (Silverlight/XBAP)
WinForms advantages.
It's older and thereby more tried and tested
There are already a lot of 3rd party controls that you can buy or get for free
The designer in Visual Studio is still, as of writing, better for WinForms than for WPF, where you will have to do more of the work yourself with WPF.
The single most important difference between WinForms and WPF is the fact that while WinForms is simply a layer on top of the standard Windows controls (e.g. a TextBox), WPF is built from scratch and doesn't rely on standard Windows controls in almost all situations. This might seem like a subtle difference, but it really isn't, which you will definitely notice if you have ever worked with a framework that depends on Win32/WinAPI.
A great example of this is a button with an image and text on it. This is not a standard Windows control, so WinForms doesn't offer you this possibility out of the box. Instead you will have to draw the image yourself, implement your own button that supports images or use a 3rd party control. With WPF, a button can contain anything because it's essentially a border with content and various states (e.g. untouched, hovered, pressed). The WPF button is "look-less", as are most other WPF controls, which means that it can contain a range of other controls inside of it. You want a button with an image and some text? Just put an Image and a TextBlock control inside of the button and you're done! You simply don’t get this kind of flexibility out of the standard WinForms controls, which is why there's a big market for rather simple implementations of controls like buttons with images and so on.
The drawback to this flexibility is that sometimes you will have to work harder to achieve something that was very easy with WinForms, because it was created for just the scenario you need it for. At least that's how it feels in the beginning, where you find yourself creating templates to make a ListView with an image and some nicely aligned text, something that the WinForms ListViewItem does in a single line of code.
This was just one difference, but as you work with WPF, you will realize that it is in fact the underlying reason for many of the other differences - WPF is simply just doing things in its own way, for better and for worse. You're no longer constrained to doing things the Windows way, but to get this kind of flexibility, you pay with a little more work when you're really just looking to do things the Windows way.
The following is a completely subjective list of the key advantages for WPF and WinForms. It should give you a better idea of what you're going into.
WPF advantages.
It's newer and thereby more in tune with current standards
Microsoft is using it for a lot of new applications, e.g. Visual Studio
It's more flexible, so you can do more things without having to write or buy new controls
When you do need to use 3rd party controls, the developers of these controls will likely be more focused on WPF because it's newer
XAML makes it easy to create and edit your GUI, and allows the work to be split between a designer (XAML) and a programmer (C#, VB.NET etc.)
Databinding, which allows you to get a more clean separation of data and layout
Uses hardware acceleration for drawing the GUI, for better performance
It allows you to make user interfaces for both Windows applications and web applications (Silverlight/XBAP)
WinForms advantages.
It's older and thereby more tried and tested
There are already a lot of 3rd party controls that you can buy or get for free
The designer in Visual Studio is still, as of writing, better for WinForms than for WPF, where you will have to do more of the work yourself with WPF.
what is WPF
What is WPF?
WPF, which stands for Windows Presentation Foundation, is Microsoft's latest approach to a GUI framework, used with the .NET framework.
But what IS a GUI framework? GUI stands for Graphical User Interface, and you're probably looking at one right now. Windows has a GUI for working with your computer, and the browser that you're likely reading this document in has a GUI that allows you to surf the web.
A GUI framework allows you to create an application with a wide range of GUI elements, like labels, textboxes and other well known elements. Without a GUI framework you would have to draw these elements manually and handle all of the user interaction scenarios like text and mouse input. This is a LOT of work, so instead, most developers will use a GUI framework which will do all the basic work and allow the developers to focus on making great applications.
There are a lot of GUI frameworks out there, but for .NET developers, the most interesting ones are currently WinForms and WPF. WPF is the newest, but Microsoft is still maintaining and supporting WinForms. As you will see in the next chapter, there are quite a few differences between the two frameworks, but their purpose is the same: To make it easy to create applications with a great GUI.
WPF, which stands for Windows Presentation Foundation, is Microsoft's latest approach to a GUI framework, used with the .NET framework.
But what IS a GUI framework? GUI stands for Graphical User Interface, and you're probably looking at one right now. Windows has a GUI for working with your computer, and the browser that you're likely reading this document in has a GUI that allows you to surf the web.
A GUI framework allows you to create an application with a wide range of GUI elements, like labels, textboxes and other well known elements. Without a GUI framework you would have to draw these elements manually and handle all of the user interaction scenarios like text and mouse input. This is a LOT of work, so instead, most developers will use a GUI framework which will do all the basic work and allow the developers to focus on making great applications.
There are a lot of GUI frameworks out there, but for .NET developers, the most interesting ones are currently WinForms and WPF. WPF is the newest, but Microsoft is still maintaining and supporting WinForms. As you will see in the next chapter, there are quite a few differences between the two frameworks, but their purpose is the same: To make it easy to create applications with a great GUI.
Google's 'Hummingbird' hatches new search formula
Google has quietly retooled the closely guarded formula running its internet search engine to give better answers to the increasingly complex questions posed by web surfers.
The overhaul came as part of an update called "Hummingbird" that Google has gradually rolled out in the past month without disclosing the modifications.
The changes could have a major impact on traffic to websites.Hummingbird represents the most dramatic alteration to Google's search engine since it revised the way it indexes websites three years ago as part of a redesign called "Caffeine," according to Amit Singhal, a senior vice president for the company. He estimates that the redesign will affect the analysis of about 90 per cent of the search requests that Google gets.
Any reshuffling of Google's search rankings can have sweeping ramifications because they steer so much of the internet's traffic. Google fields about two of out every three search requests in the US and handles an even larger volume in some parts of Europe. The changes could also drive up the price of Google ads tied to search requests if websites whose rankings are demoted under the new system feel they have to buy the marketing messages to attract traffic.
The search ads and other commercial pitches related to web content account for most of Google's revenue, which is expected to approach $60 billion this year.
Google disclosed the existence of the new search formula on Thursday at an event held in the Menlo Park, California, garage where CEO Larry Page and fellow co-founder Sergey Brin started the company 15 years ago.
Google celebrates its birthday on September 27 each year, even though the company was incorporated a few weeks earlier. The company is now based in Mountain View, California, at a sprawling complex located about seven miles from the 1,900-square-foot home where Page and Brin paid $1,700 per month to rent the garage and a bedroom. The co-founders' landlord was Susan Wojcicki, who is now a top Google executive and Brin's sister-in-law.
Wojcicki sold the home to Google in 2006 and it is now maintained as a monument to the company's humble beginnings.
Google's renovations to its search engine haven't triggered widespread complaints from other websites yet, suggesting that the revisions haven't resulted in a radical reshuffling in how websites rank in the recommendations. The Caffeine update spurred a loud outcry because it explicitly sought to weed out websites that tried to trick Google's search engine into believing their content was related to common search requests. After Caffeine kicked in, hundreds of websites that consistently won a coveted spot near the top of Google's search results had been relegated to the back pages or exiled completely.
Hummingbird is primarily aimed at giving Google's search engine a better grasp at understanding concepts instead of mere words, Singhal said.
The change needed to be done, Singhal said, because people have become so reliant on Google that they now routinely enter lengthy questions into the search box instead of just a few words related to specific topics.
With the advent of smartphones and Google's voice-recognition technology, people also are increasingly submitting search requests in sequences of spoken sentences that resemble an ongoing conversation. That trend also factored into Google's decision to hatch Hummingbird.
Just as Page and Brin set out to do when they started Google in a garage, "we want to keep getting better at helping you make the most of your life," Singhal said.
Besides Hummingbird, Google also announced a few other updates to existing search features aimed at providing information more concisely so people won't need to navigate to another website. These changes are part of Google's effort to adapt to the smaller screens of smartphones that aren't well suited for hopscotching across the Internet.
The additions primarily affect Google's "Knowledge Graph," an encyclopedia-like box that increasingly appears at the top or alongside the search results, and Google Now, a virtual assistant that tailors key information suited to each user's habits, interest and location.
Besides providing informational snapshots of famous people and landmarks, the Knowledge Graph is now capable of comparing the attributes of two different things, such as olive oil and coconut oil. It will also be possible to ask the Knowledge Graph to sort through certain types of information, such as the creative evolution of various artists.
An upcoming update to Google's search application for devices running Apple's mobile operating system will ensure notifications about personal appointments and errand reminders are also delivered on a smartphones or tablets running on Google's competing Android software. Google Now also will start flagging new developments and information about famous people that have previously piqued a user's interest.
Thursday, 26 September 2013
Apple 5s. .
Apple iPhone 5S teardown reveals Touch ID fingerprint scanner, new camera module and other secrets
Apple’s latest offering has only just hit stores in select markets and already it has been taken apart limb from limb. Not surprisingly the people responsible are the team at iFixit, which gave the device their famous teardown treatment. After completely disassembling the iPhone 5S, the team not only found it relatively easy to repair, but also found the much-talked-about Touch ID sensor and a new Sony camera module among others. While removing the front panel, the team found a cable running from the Touch ID sensor to the Lightning port assembly.
The Touch ID assembly (looks same as what leaked a month back) is essentially a bunch of very small capacitors that creates an “image” of the ridges on your finger.Like in the iPhone 4S and the iPhone 5, they found that the image sensor hidden in the rear camera assembly again comes from Sony. But the markings on the module are different and hence the sensor is not Sony’s IMX145, but a newer variant made specifically for the iPhone 5S. That isn’t surprising considering Apple had talked about retaining an 8-megapixel camera while having a bigger sensor in place for better photo quality. Lastly, on prying out the battery, they found it to be a 1,560mAh, which is much bigger than the 1,440mAh on the iPhone 5.
Overall, iFixit gave the iPhone 5S 6 out of 10 in terms of ease of reparability, with 10 being the easiest to repair. The device is overall easy to open and repair, barring a couple of parts like the Pentalobe screws, battery attached with a strong adhesive and Touch ID sensor, which make the process a bit tedious.
Apple’s latest offering has only just hit stores in select markets and already it has been taken apart limb from limb. Not surprisingly the people responsible are the team at iFixit, which gave the device their famous teardown treatment. After completely disassembling the iPhone 5S, the team not only found it relatively easy to repair, but also found the much-talked-about Touch ID sensor and a new Sony camera module among others. While removing the front panel, the team found a cable running from the Touch ID sensor to the Lightning port assembly.
The Touch ID assembly (looks same as what leaked a month back) is essentially a bunch of very small capacitors that creates an “image” of the ridges on your finger.Like in the iPhone 4S and the iPhone 5, they found that the image sensor hidden in the rear camera assembly again comes from Sony. But the markings on the module are different and hence the sensor is not Sony’s IMX145, but a newer variant made specifically for the iPhone 5S. That isn’t surprising considering Apple had talked about retaining an 8-megapixel camera while having a bigger sensor in place for better photo quality. Lastly, on prying out the battery, they found it to be a 1,560mAh, which is much bigger than the 1,440mAh on the iPhone 5.
Overall, iFixit gave the iPhone 5S 6 out of 10 in terms of ease of reparability, with 10 being the easiest to repair. The device is overall easy to open and repair, barring a couple of parts like the Pentalobe screws, battery attached with a strong adhesive and Touch ID sensor, which make the process a bit tedious.
Wednesday, 25 September 2013
Tuesday, 24 September 2013
Windows 7-ஐ தமிழில் மாற்ற வேண்டுமா?
கணினி உலகம் மற்றும் இணையத்தில் ஒவ்வொரு நிறுவனமும் தனக்கான இடத்தை தக்கவைத்துக் கொள்ளவும், அதிகமான வாசகர்களை பெறவும் நிறைய வசதிகளை அறிமுகம் செய்வது வழக்கம். அதில் முக்கியமாக தங்கள் படைப்புகளை குறிப்பிட்ட மழிகளில் தந்து அதிக பயனர்களை பெறுவது.
இதுவரை கூகுள், பேஸ்புக் மற்றும் பல மென்பொருட்கள் அறிமுகமான கொஞ்ச வருடங்களிலேயே இந்த விசயத்தில் அடித்து ஆட, இவர்களுக்கெல்லாம் முன்னோடியான மைக்ரோசாப்ட் கொஞ்சம் தாமதமாக இந்த விஷயத்தை கையில் எடுத்து பல வசதிகளை அதன் பயனர்களுக்கு தந்துள்ளது.
அந்த வகையில் இன்றைய பதிவில் உங்கள் விண்டோஸ் 7 இயங்கு தளம் கொண்ட கணினியை எப்படி தமிழில் பயன்படுத்துவது என்று பார்ப்போம்.
முதலில் இந்த இணைப்பில் (http://www.microsoft.com/downloads/details.aspx?FamilyID=a1a48de1-e264-48d6-8439-ab7139c9c14d&displaylang=ta)
சென்று தமிழுக்கான விண்டோஸ் 7 மொழி இடைமுகத் தொகுப்பை (Lanugage Interface Pack – LIP) தரவிறக்கம் செய்யுங்கள். 32 பிட் அல்லது 64 பிட் ஏதேனும் ஒன்றை மட்டும். எது என்ற குழப்பத்தில் உள்ளவர்கள் 32 பிட்டை தரவிறக்கம் செய்யவும்.
உங்கள் கணினியில் தரவிறக்கம் ஆன பின்பு, அதை உங்கள் கணினியில் நீங்கள் இன்ஸ்டால் செய்ய வேண்டும்.
Next என்பதை தெரிவு செய்து, பின் அடுத்து வரும் பகுதியில் I Accept the license terms என்பதை தெரிவு செய்து மீண்டும் ஒரு Next, அடுத்து மீண்டும் ஒரு Next, இப்போது தமிழ் மொழி உங்கள் கணினியில் இன்ஸ்டால் ஆகும்.
இன்ஸ்டால் ஆன பின் மீண்டும் Next என்பதை கிளிக் செய்யுங்கள். இப்போது நீங்கள் Display மொழியை தெரிவு செய்ய வேண்டும். அதில் தமிழ் என்பதை தெரிவு செய்து “Apply display language to welcome screen and system accounts” என்பதை கிளிக் செய்து “Change Display Language” என்பதை கிளிக் செய்யுங்கள்.
அவ்வளவு தான் இப்போது உங்கள் கணினியை ஒரு முறை நீங்கள் Restart செய்ய வேண்டும்.
இனி உங்கள் கணினி தமிழில் இயங்க ஆரம்பிக்கும். அனைத்து வசதிகளும், செயல்களும் தமிழில் இல்லாவிட்டாலும் பொதுவான பல விஷயங்கள் தமிழில் இருக்கும்.
இனி ஆங்கிலம் தெரியாதவர்கள் கூட கணினியில் அடிப்படை விசயங்களை செய்ய முடியும்.
மீண்டும் ஆங்கிலத்துக்கு மாற: ஸ்டார்ட் மெனு >> கட்டுப்பாட்டுப் பலகம் >> காட்சி மொழியை மாற்றவும் என்பதை கிளிக் மாற்றலாம். இவ்வாறு வராதவர்கள் கட்டுப்பாட்டுப் பலகம் >> வட்டாரம் மற்றும் மொழி என்பதை கிளிக் செய்து வரும் சிறிய விண்டோவில் “விசைப்பலகைகளும் மொழிகளும்” என்கிற பகுதியில் காட்சி மொழி ஒன்றை தேர்வு செய்யவும் என்பதற்கு கீழே English என்பதை தெரிவு செய்யுங்கள்.
ஆங்கிலத்தில் இருந்து தமிழுக்கு மாற (இன்ஸ்டால் செய்த பின்): Control Panel >> Change Display Language என்பதை கிளிக் மாற்றலாம். இவ்வாறு வராதவர்கள் Control Panel >> Region and Language என்பதை கிளிக் செய்து வரும் சிறிய விண்டோவில் Keyboards and Language என்பதில் Choose a Display Language கீழே தமிழை தெரிவு செய்து கொள்ளலாம்.
கணினி உலகம் மற்றும் இணையத்தில் ஒவ்வொரு நிறுவனமும் தனக்கான இடத்தை தக்கவைத்துக் கொள்ளவும், அதிகமான வாசகர்களை பெறவும் நிறைய வசதிகளை அறிமுகம் செய்வது வழக்கம். அதில் முக்கியமாக தங்கள் படைப்புகளை குறிப்பிட்ட மழிகளில் தந்து அதிக பயனர்களை பெறுவது.
இதுவரை கூகுள், பேஸ்புக் மற்றும் பல மென்பொருட்கள் அறிமுகமான கொஞ்ச வருடங்களிலேயே இந்த விசயத்தில் அடித்து ஆட, இவர்களுக்கெல்லாம் முன்னோடியான மைக்ரோசாப்ட் கொஞ்சம் தாமதமாக இந்த விஷயத்தை கையில் எடுத்து பல வசதிகளை அதன் பயனர்களுக்கு தந்துள்ளது.
அந்த வகையில் இன்றைய பதிவில் உங்கள் விண்டோஸ் 7 இயங்கு தளம் கொண்ட கணினியை எப்படி தமிழில் பயன்படுத்துவது என்று பார்ப்போம்.
முதலில் இந்த இணைப்பில் (http://www.microsoft.com/downloads/details.aspx?FamilyID=a1a48de1-e264-48d6-8439-ab7139c9c14d&displaylang=ta)
சென்று தமிழுக்கான விண்டோஸ் 7 மொழி இடைமுகத் தொகுப்பை (Lanugage Interface Pack – LIP) தரவிறக்கம் செய்யுங்கள். 32 பிட் அல்லது 64 பிட் ஏதேனும் ஒன்றை மட்டும். எது என்ற குழப்பத்தில் உள்ளவர்கள் 32 பிட்டை தரவிறக்கம் செய்யவும்.
உங்கள் கணினியில் தரவிறக்கம் ஆன பின்பு, அதை உங்கள் கணினியில் நீங்கள் இன்ஸ்டால் செய்ய வேண்டும்.
Next என்பதை தெரிவு செய்து, பின் அடுத்து வரும் பகுதியில் I Accept the license terms என்பதை தெரிவு செய்து மீண்டும் ஒரு Next, அடுத்து மீண்டும் ஒரு Next, இப்போது தமிழ் மொழி உங்கள் கணினியில் இன்ஸ்டால் ஆகும்.
இன்ஸ்டால் ஆன பின் மீண்டும் Next என்பதை கிளிக் செய்யுங்கள். இப்போது நீங்கள் Display மொழியை தெரிவு செய்ய வேண்டும். அதில் தமிழ் என்பதை தெரிவு செய்து “Apply display language to welcome screen and system accounts” என்பதை கிளிக் செய்து “Change Display Language” என்பதை கிளிக் செய்யுங்கள்.
அவ்வளவு தான் இப்போது உங்கள் கணினியை ஒரு முறை நீங்கள் Restart செய்ய வேண்டும்.
இனி உங்கள் கணினி தமிழில் இயங்க ஆரம்பிக்கும். அனைத்து வசதிகளும், செயல்களும் தமிழில் இல்லாவிட்டாலும் பொதுவான பல விஷயங்கள் தமிழில் இருக்கும்.
இனி ஆங்கிலம் தெரியாதவர்கள் கூட கணினியில் அடிப்படை விசயங்களை செய்ய முடியும்.
மீண்டும் ஆங்கிலத்துக்கு மாற: ஸ்டார்ட் மெனு >> கட்டுப்பாட்டுப் பலகம் >> காட்சி மொழியை மாற்றவும் என்பதை கிளிக் மாற்றலாம். இவ்வாறு வராதவர்கள் கட்டுப்பாட்டுப் பலகம் >> வட்டாரம் மற்றும் மொழி என்பதை கிளிக் செய்து வரும் சிறிய விண்டோவில் “விசைப்பலகைகளும் மொழிகளும்” என்கிற பகுதியில் காட்சி மொழி ஒன்றை தேர்வு செய்யவும் என்பதற்கு கீழே English என்பதை தெரிவு செய்யுங்கள்.
ஆங்கிலத்தில் இருந்து தமிழுக்கு மாற (இன்ஸ்டால் செய்த பின்): Control Panel >> Change Display Language என்பதை கிளிக் மாற்றலாம். இவ்வாறு வராதவர்கள் Control Panel >> Region and Language என்பதை கிளிக் செய்து வரும் சிறிய விண்டோவில் Keyboards and Language என்பதில் Choose a Display Language கீழே தமிழை தெரிவு செய்து கொள்ளலாம்.
Create A Undeletable And Unrenamable Folders In Windows
Create A Undeletable And Unrenamable Folders In Windows
Go to Start and then Click on Run
Type cmd & hit enter (To open Command Prompt ).
Remember you cannot create Undeletable & unrenamable folder in your root directory (i.e. where the windows is installed) That means you can't make this kind of folder in C: drive if you installed windows on C:
Type D: or E: and hit enter
Type md con\ and hit enter (md - make directory)
You may use other words such as aux, lpt1, lpt2, lpt3 up to lpt9 instead of con in above step.
Open that directory, you will see the folder created of name con.
Try to delete that folder or rename that folder windows will show the error message.
How to delete that folder ?
It is not possible to delete that folder manually but you can delete this folder by another way mentioned below.
Open Command Prompt
Type D: ( if u created this type of folder in D: drive) & hit enter
Type rd con\ (rd - remove directory)
Open that directory and the folder will not appear because it is removed.
Go to Start and then Click on Run
Type cmd & hit enter (To open Command Prompt ).
Remember you cannot create Undeletable & unrenamable folder in your root directory (i.e. where the windows is installed) That means you can't make this kind of folder in C: drive if you installed windows on C:
Type D: or E: and hit enter
Type md con\ and hit enter (md - make directory)
You may use other words such as aux, lpt1, lpt2, lpt3 up to lpt9 instead of con in above step.
Open that directory, you will see the folder created of name con.
Try to delete that folder or rename that folder windows will show the error message.
How to delete that folder ?
It is not possible to delete that folder manually but you can delete this folder by another way mentioned below.
Open Command Prompt
Type D: ( if u created this type of folder in D: drive) & hit enter
Type rd con\ (rd - remove directory)
Open that directory and the folder will not appear because it is removed.
Convert and Save Web Pages as PDF in Chrome Without Any Addon
Now Change the destination to “Save As PDF” and hit the save button and the current web page will instantly download as a PDF document. So no need to install any app on your PC or any Extension/addon on your browser to convert web pages into PDF. All you have to use Google Chrome to do this easily and in simple way.
Wednesday, 18 September 2013
Tuesday, 17 September 2013
C PUZZLE PROGRAMS-01
C Programs
TYPEDEF
1. What can be said of the
following program ?
main()
{
enum Months {JAN =1,FEB,MAR,APR};
Months X = JAN;
if(X==1)
{
printf("Jan is the first month");
}
}
a) Does not print anything
b) Prints : Jan is the first month
c) Generates compilation error
d) Results in runtime error
main()
{
enum Months {JAN =1,FEB,MAR,APR};
Months X = JAN;
if(X==1)
{
printf("Jan is the first month");
}
}
a) Does not print anything
b) Prints : Jan is the first month
c) Generates compilation error
d) Results in runtime error
Answer : b
2.main()
{
extern
int i;
i=20;
printf("%d",i);
}
Answer:
Linker Error : Undefined
symbol '_i'
Explanation:
extern
storage class in the following declaration,
extern int i;
specifies to the
compiler that the memory for i is
allocated in some other program and that address will be given to the current
program at the time of linking. But linker finds that no other variable of name
i is available in any other program
with memory space allocated for it. Hence a linker error has occurred .
3. enum
colors {BLACK,BLUE,GREEN}
main()
{
printf("%d..%d..%d",BLACK,BLUE,GREEN);
return(1);
}
Answer:
0..1..2
Explanation:
enum
assigns numbers starting from 0, if not explicitly defined.
4. Given the following
statement enum day = { jan = 1 ,feb=4, april, may} What is the value of may?
(a) 4
(b) 5
(c) 6
(d) 11
(e) None of the above
(a) 4
(b) 5
(c) 6
(d) 11
(e) None of the above
Answer c) 6
SWITCH:
5. What is the output of the following program?
main()
{
int l=6;
switch(l)
{ default : l+=2;
case 4: l=4;
case 5: l++;
break;
}
printf("%d",l);
}
a)8 b)6 c)5 d)4 e)none
Answer : c) 5
6.
main()
{
int i=3;
switch(i)
{
default:printf("zero");
case 1: printf("one");
break;
case 2:printf("two");
break;
case 3: printf("three");
break;
}
}
Answer :
three
Explanation :
The default case
can be placed anywhere inside the loop. It is executed only when all other
cases doesn't match.
7. #include<stdio.h>
main()
{
int i=1,j=2;
switch(i)
{
case 1:
printf("GOOD");
break;
case j:
printf("BAD");
break;
}
}
Answer:
Compiler
Error: Constant expression required in function main.
Explanation:
The case
statement can have only constant expressions (this implies that we cannot use
variable names directly so an error).
Note:
Enumerated
types can be used in case statements.
8. main()
{
float i=1.5;
switch(i)
{
case
1: printf("1");
case 2:
printf("2");
default :
printf("0");
}
}
Answer:
Compiler Error: switch expression not integral
Explanation:
Switch statements can be applied only to integral types.
10. Output of the following program is
main()
{
int
i=0;
for(i=0;i<20;i++)
{
switch(i)
case
0:i+=5;
case
1:i+=2;
case
5:i+=5;
default
i+=4;
break;
}
printf("%d,",i);
}
}
a) 0,5,9,13,17
b) 5,9,13,17
c) 12,17,22
d) 16,21
e) Syntax error
Ans. (d)
11. main()
{
int i;
for(i=0;i<3;i++)
switch(i)
{
case 1:
printf("%d",i);
case 2 :
printf("%d",i);
default:
printf("%d"i);
}
}
Answer: 011122
FUNCTIONS:
12. What is the output of the following program?
main()
{
int x=20;
int y=10;
swap(x,y);
printf("%d %d",y,x+2);
}
swap(int x,int y)
{
int temp;
temp =x;
x=y;
y=temp;
}
a) 10,20 b) 20,12 c) 22,10
d)10,22 e)none
Answer : d)10,22
13.
Which of the following about the following two declaration is true
i ) int *F()
ii) int (*F)()
Choice :
a) Both are identical
b) The first is a correct declaration and the second is wrong
c) The first declaraion is a function returning a pointer to an integer and the second is a pointer to function returning int
d) Both are different ways of declarin pointer to a function
i ) int *F()
ii) int (*F)()
Choice :
a) Both are identical
b) The first is a correct declaration and the second is wrong
c) The first declaraion is a function returning a pointer to an integer and the second is a pointer to function returning int
d) Both are different ways of declarin pointer to a function
Answer : c).
14.
main()
{
printf("%p",main);
}
Answer:
Some
address will be printed.
Explanation:
Function
names are just addresses (just like array names are addresses).
main() is also a function. So the
address of function main will be printed. %p in printf specifies that the
argument is an address. They are printed as hexadecimal numbers.
15. main()
{
clrscr();
}
clrscr();
Answer:
No
output/error
Explanation:
The first
clrscr() occurs inside a function. So it becomes a function call. In the second
clrscr(); is a function declaration (because it is not inside any function).
16. main()
{
int i;
printf("%d",scanf("%d",&i)); // value 10 is given as input here
}
Answer:
1
Explanation:
Scanf returns number of items
successfully read and not 1/0. Here 10
is given as input which should have been scanned successfully. So number of
items read is 1.
17. main()
{
show();
}
void show()
{
printf("I'm the greatest");
}
Answer:
Compier
error: Type mismatch in redeclaration of show.
Explanation:
When the
compiler sees the function show it doesn't know anything about it. So the
default return type (ie, int) is assumed. But when compiler sees the actual
definition of show mismatch occurs since it is declared as void. Hence the
error.
The
solutions are as follows:
1.
declare void show() in main() .
2.
define show() before main().
3.
declare extern void show() before the use of show().
18. main()
{
main();
}
Answer:
Runtime error : Stack overflow.
Explanation:
main function
calls itself again and again. Each time the function is called its return
address is stored in the call stack. Since there is no condition to terminate the
function call, the call stack overflows at runtime. So it terminates the
program and results in an error.
19. What
are the following notations of defining functions known as?
i. int abc(int a,float b)
{
/* some code */
}
ii. int abc(a,b)
int a; float b;
{
/* some code*/
}
Answer:
i. ANSI C notation
ii.
Kernighan & Ritche notation
20.
What is printed when this program is executed
main()
{
printf ("%d\n",f(7));
}
f(X)
{
if ( x<= 4)
return x;
return f(--x);
}
a) 4
b)5
c) 6
d)
7
Answer : a)
21. what is printed when the
following program is compiled and executed?
int func (int x)
{
if (x<=0)
return(1);
return func(x -1) +x;
}
main()
{
printf("%d\n",func(5));
}
a) 12
b) 16
c) 15
d) 11
int func (int x)
{
if (x<=0)
return(1);
return func(x -1) +x;
}
main()
{
printf("%d\n",func(5));
}
a) 12
b) 16
c) 15
d) 11
Answer
: .b) 16.
22.
Find the output:
main()
{
int a==4
sqrt(a);
printf("%d",a);
}
1).2.0
2). 2 3). 4.0 4). 4
Answer :
2
23. Find the output
main()
{
int a[]={ 2,4,6,8,10 };
int i;
change(a,5);
for( i = 0; i
<= 4; i++)
printf("\n %d",a[i]);
}
change( int *b, int n)
{
int i;
for( i = 0; i < n; i++)
*(b+i) = *(b+i) + 5;
}
Answer:
24.
#include<studio.h>
main()
{
func(1);
}
func(int i){
static char *str[] ={
"One","Two","Three","Four"};
printf("%s\n",str[i++]);
return;
}
Answer:- it will give
warning because str is pointer to the char but
it is initialized with more values
if it is not considered then the answer is Two
*/
25.
Find the output:
#include<stdio.h>
/* This problem was asked in PCS Bombay in a
walk-in-interview
Write a recursive function that calculates
n * (n-1) * (n-2) * ....... 2 * 1 */
main() {
int factorial(int n);
int i,ans;
printf("\n Enter a Number:");
scanf("%d",&i);
ans = factorial(i);
printf("\nFactorial by recursion =
%d\n", ans);
}
int factorial(int n)
{
if (n <= 1) return (1);
else
return ( n * factorial(n-1));
}
Answer
:
26.Find
the output
#include <stdio.h>
main()
{
int j,ans;
j = 4;
ans = count(4);
printf("%d\n",ans);
}
int count(int i)
{
if ( i < 0) return(i);
else
return( count(i-2) + count(i-1));
}
Answer
:
/* It is showing -18 as an answer */
27.
Find the output
int x;
main()
{
int x=0;
{
int x=10;
x++;
change_value(x);
x++;
Modify_value();
printf("First output: %d\n",x);
}
x++;
main()
{
int x=0;
{
int x=10;
x++;
change_value(x);
x++;
Modify_value();
printf("First output: %d\n",x);
}
x++;
change_value(x);
printf("Second Output : %d\n",x);
Modify_value();
printf("Third Output : %d\n",x);
}
printf("Second Output : %d\n",x);
Modify_value();
printf("Third Output : %d\n",x);
}
Modify_value()
{
return (x+=10);
}
change_value()
{
return(x+=1);
}
Answer
:
28. Consider the following program
main()
{
int i=20,*j=&i;
f1(j);
*j+=10;
f2(j);
printf("%d and %d",i,*j);
}
f1(k)
int *k;
{
*k +=15;
}
f2(x)
int *x;
{
int m=*x,*n=&m;
*n += 10;
}
The values printed by the program will
be
a) 20 and 55
b) 20 and 45
c) 45 and 45
d) 45 and 55
e) 35 and 35
Answer : c
29. what is printed when the following
program is
compiled and executed?
int func (int x)
{
if (x<=0)
return(1);
return func(x -1) +x;
}
main()
{
printf("%d\n",func(5));
}
a) 12
b) 16
c) 15
d) 11
Answer : b
STRUCTURE AND UNION :
30. What is the size of the following union. Assume that the size of int =2, size of float =4 and size of
char =1.
Union Tag
{
int a;
float b;
char c;
};
int a;
float b;
char c;
};
a)2 b)4 c)1 d) 7
Answer : b
DATA TYPES
31.
What is th output of the following
program?
int x= 0x65;
main()
{
char x;
printf("%d\n",x)
}
a) compilation error b) 'A' c) 65 d) unidentified
main()
{
char x;
printf("%d\n",x)
}
a) compilation error b) 'A' c) 65 d) unidentified
Answer : c
Subscribe to:
Posts (Atom)