|
|
Question. What is meant by hashing in C language?
Answer.
Hashing is the transformation of a string of characters into a usually shorter fixed-length value or key that represents the original string. Hashing is used to index and retrieve items in a database because it is faster to find the item using the shorter hashed key than to find it using the original value. It is also used in many encryption algorithms.
Here are some of the common hash functions that are used in C programming:
Digit rearrangement: This is simply taking part of the original value or key such as digits in positions 3 through 6, reversing their order, and then using that sequence of digits as the hash value or key.
The division-remainder method: The size of the number of items in the table is estimated. That number is then used as a divisor into each original value or key to extract a quotient and a remainder. The remainder is the hashed value. (Since this method is liable to produce a number of collisions, any search mechanism would have to be able to recognize a collision and offer an alternate search mechanism.)
Radix transformation: Where the value or key is digital, the number base (or radix) can be changed resulting in a different sequence of digits. (For example, a decimal numbered key could be transformed into a hexadecimal numbered key.) High-order digits could be discarded to fit a hash value of uniform length.
Folding: This method divides the original value (digits in this case) into several parts, adds the parts together, and then uses the last four digits (or some other arbitrary number of digits that will work ) as the hashed value or key.
- C Interview Questions -
What is the difference between Arrays and Pointers?
Answer.
Arrays use subscripted variables to access and manipulate data. Array variables can be equivalently written using pointer expression.
Pointers are used to manipulate data using the address. Pointers use * operator to access the data pointed to by them.
Just as we humans use different languages to interact with each other, similarly, computers have their own languages through which we can communicate with them. These languages are broadly of two types: High Level and Low Level Languages.
One very popular High Level language is Java, which can be used to write efficient programs for the internet and the world wide web. Java can also be used to write programs for other environments such as consoles and mobile phones, but its popularity is mainly because of its power to generate robust applications for the internet. Today we’ll see how to write a small program in Java. When you begin learning a computer programming language, it is customary to write the “hello world” program as your first. This program tells the computer to display the text “Hello World!” on the computer monitor. It’s like telling the world that you are the newest member on board the Java bandwagon. So let’s get started!
- Navigate to www.java.sun.com and download the Java JDK or Java SE, not JRE (Java Runtime Environment). Once its downloaded, install it. Then restart the computer.
- Open the text editor and write the following code:
public class HelloWorld{
public static void main(String[] args){
System.out.println("Hello World!");
}
}
- Save this code as HelloWorld.java. In Windows, make sure you choose the “all files” option from the file type drop down list box, otherwise it will be saved as a text file and not a .java file.
- Click start > run and type command or cmd (try each and see which one works for your operating system).
- From the command prompt, drill down to the folder where you saved the HelloWorld.java file. (type “cd <name of folder>” you can use tab for auto completion)
- Type the following: javac HelloWorld.java and press Enter. You should see that after thinking for a while the computer returns to the command prompt.
- Type “java HelloWorld” (no quotes) and see what happens. You should see the text “Hello World” displayed on the monitor right below where you issued the java HelloWorld command.
LimeWire is a peer-to-peer file-sharing software app for all types of files, including mp3, video, images, games, and others. Some of the cool features of LimeWire are dynamic querying, file previews while the file is being downloaded, advanced search for downloading rare files, and clean, easy to use interface.
LimeWire comes with a new spam blocker that blocks fake results and files. The software also features automatic updates that will ensure that the users are always using the latest and greatest version. Using LimeWire you can also search for Creative Commons and Weedshare licensed files, and publish your own creative works under the Creative Commons licensing. LimeWire contains no adware or spyware or other malware. Additionally, it also comes with bittorrent support.
LimeWire started as a post-Napster clone and has now become the quintessential Gnutella client. Today, LimeWire is considered by many as the highest-profile P2P application. Version 5 of LimeWire re-envisions for a Web 2.0 world, with more emphasis on sharing with friends, Web 2.0 style buttons, and better and cleaner user interface.
LimeWire 5 comes with a redesigned interface which comes with two search bars and sidebars. The uppermost search bar is the global search that scans the entire network, while the secondary one on the right searches your library. The sidebars similar in a way. Both are located on the left side, with the outer one providing three choices: your library, the global P2P network, and your friends.
Clicking on “My Library” and your inner sidebar displays your collection of music, movies, and documents. The P2P Network option displays the files you are uploading and downloading, while the Friends option allows you to share your library specifically with your Google/Jabber contacts, which can be imported into the software. Search results are presented in both the new Web 2.0-style that surfaces just the most relevant information, with an Information button to dive deeper or the “classic” spreadsheet view.
The Advanced Tools feature is also new, which lets power users drill down and get highly specific information about who they’re connected to, similar to what’s available from torrent clients. This data includes IP addresses, bandwidth, the program being used and its version. The new features and overall functionality make this by far the most mature version of LimeWire to date. Despite the typical performance flaws found in all file-sharing clients, this latest version continues to offer solid performance and good looks across the board.
Foxit Reader is a lightweight, small but free PDF document reader/viewer. It is incredibly small in size, lightening-fast to launch and rich in features. Its core function is compatible with PDF Standard 1.7. In the past, you’ve had to download a huge PDF reader from another software company, go through a lengthy installation process and wait for an annoying splash window to disappear just to open a PDF document.
Adobe Reader is a real pain to use. It’s very large, bloated, and comes with features most users will never use in their lifetimes. However, Foxit PDF Reader 3.0 kills all the bloat and yet comes with some very useful features, such as multimedia support and content-sharing, while still allowing you to quickly access your PDFs.
Foxit Reader looks very similar to Adobe Reader, so users won’t have to change their reading habits and won’t have any problems in making the switch to the new software. Text readability offered by Foxit Reader is similar to Adobe Reader. Foxit Reader starts surprisingly fast when compared with Adobe Reader. Foxit Reader can also be made to work with your Internet browser, but you can find help on Foxit’s support forums. Foxit Reader opens PDF files from the Internet in their own Foxit window, instead of within the browser. Opening the browser to open PDFs is often problematic on computers with low system resources.
Earlier versions of Foxit Reader suffered from memory leaking issues. However, this has been corrected in the latest version. Other updates include fixing the hyperlink issue, added multimedia support, printing highlighted-only sections, and tabbed PDF browsing, which allows you to read multiple PDFs at the same time in the same window. Overall, unless you’re an Adobe fanatic Foxit Reader is what we recommend.
[Download Foxit Reader]
Apple has officially started selling its well known smartphone in China which is the world’s largest cell phone market. Apple launched the phone in China on Friday night.
The launch in China didn’t see the frenzy of the first iPhone launch day like in the U.S. However, crowds there did line up for the iPhone several hours before the launch at several outlets. Several hundred people lined up in the rain and cold outside The Place shopping center in Beijing, for example. There, Zhi Xianzhong became the first person to get the iPhone from Apple partner China Unicom after waiting 7 hours and 40 minutes, as reported by China Daily.
China Unicom, China’s second largest network operator after China Mobile, is selling two versions of the iPhone in China under a three-year agreement with Apple. However, the costs are unexpectedly high. Prices range from 4,999 yuan (about $732) for the 8GB 3G model to 6,999 yuan (about $1,025) for the 32GB 3GS phone (with no contract).
In China, one can purchase cheaper, cracked, gray-market iPhone models at local electronics shops or bring them from abroad. However, cost isn’t the only potential issue here. To adhere to Chinese government regulations, the handsets also lack a key feature–Wi-Fi capability.However, China Unicom hopes to make Wi-Fi-enabled iPhones available within the next few months.
China Unicom is currently selling the iPhone in 285 cities in China. It expects to sell more than 5 million iPhones in the next three years, according to Chinese news reports, however the company has not released any statements about its sales aims and expectations.
Recently, Steve Ballmer said that Windows 7 is the best OS from Microsoft till date. Now that Windows 7 is finally available, users will be able to decide if or not Ballmer’s statements are true. Till now, Windows 7 has received favorable reviews and it appears that it is doing quite well as far as sales are concerned.
How can one measure if an OS is the best? Coming to a firm conclusion is not so easy as all OSes have both pros and cons.
Price
Price is one of the major factors one takes into consideration while choosing an OS. Then again, there are many caveats. For example, Windows 7 Home Premium Upgrade edition costs $120. On the other hand, Mac OS X Snow Leopard costs only $29. But you can’t run it on cheap PC hardware. You need a MAC to use it. So overall, it is way costlier than Windows.
Then again, Linux is free. But many users (especially less tech savvy people) find it very difficult to use. In other words, the learning-curve is very steep. Despite this, Linux always beats Windows when it comes to stability and security.
Market Share
Market share represents how good a product is. However, this is not a definitive metric. This is because it is possible to push a product using aggressive marketing and make it the market leader. The pros and cons of the product would be immaterial then. Everyone uses it, so the new user will have no other go except to use it himself/herself.
According to statistics, Windows Xp is still the most popular OS. Even today, more than 70 per cent of the users have Windows Xp installed on their computer. Around 18 per cent Windows Vista while 5 per cent use MAC OS.
Vulnerabilities / Stability
We cannot consider an OS to be the best if it crashes every now and then or if it is prone to viruses. Microsoft’s products have always been criticized by security experts for their flaws and vulnerabilities. In the recent years, Microsoft has been taking strong measures to fix bugs and vulnerabilities in its software.
Security was one of the major concerns that was properly addressed during the development of Windows 7. Windows 7 is very secure and stable and so is not to vulnerable to viruses and malware, at least for now.
On the other hand, Linux is much more secure. This is disputed by many who say Linux is equally vulnerable except that malware-writers don’t bother due to low market share and tech-savvy nature of Linux users.
Hardware Compatibility
As OS should run on a range of different hardware. At the same time, system requirements should be reasonable. The OS should also be compatible with other software and vice versa. There is no point in creating a new Windows upgrade which will render all the older software useless.
Windows is definitely the market leader when it comes to software availability. While it is true that Linux distros such as Ubuntu offer many software for free, many of the commercial software have no equivalents in the free software world.
To conclude, Steve Ballmer’s statements are neither right nor wrong. They represent his opinion, nothing more. If you ask me, I would say Windows 2000 was the best OS in Microsoft’s history…
This tutorial will show you how to set up Microsoft Outlook to work with your e-mail account. These directions focus on setting up Microsoft Outlook 2003, but these settings are similar in other versions of Microsoft Outlook.
- Select Tools > E-mail Accounts from Microsoft Outlook
- Select “Add a new e-mail account” from the Email Accounts wizard window, and click Next.
- Select “POP3″ for your server type and and click Next
- Enter your information as follows on the Internet E-mail Settings (POP3) window
- Click “More Settings”
- Select the “Outgoing Server” tab on the Internet E-mail Settings window
- Select “My outgoing server (SMTP) requires authentication.”
- Select the “Advanced” tab and change the “Outgoing server (SMTP)” port to 80 or 3535
- Select OK
- Click Next
- Click Finish
Here is simple computer prank you can play on your friends.
Instructions:
#1. Take a screen shot by pressing the keyboard’s [PrtScr] button.
#2. Open up Microsoft Paint.
#3. Paste the captured image into Microsoft Paint by pressing [Ctrl] and “V” (or choosing “Edit” from the File menu, then selecting “Paste”). The screen shot will appear.
#4. Select “Image” and Rotate by 180 degrees.
#5. Save the picture. Be sure to remember where you saved it.
#6. Close Microsoft Paint.
#7. Right-click the desktop background and select “Properties”, then click on the “Desktop” tab.
#8. Click the “Browse” button on the right of the window.
#9. Choose the picture that you saved from Microsoft Paint.
#10. Click “Ok” to save your changes.
#11. Right-click on the desktop background and select “Arrange Icons By”, then select “Show Desktop Items” to uncheck it. It may take a moment for the effects to be made. If your friend’s computer doesn’t show the “Show Desktop Items” option, you may move all of their desktop icons (user created ones, not the Recycle Bin, etc.) to a different folder. You may also hide desktop icons such as “My Documents”, “My Computer”, “Internet Explorer”, etc. by right-clicking on the desktop, selecting “Properties”, clicking on the “Desktop” tab, and then clicking on the “Customize Desktop…” button.
#12. Close all open windows.
The world’s largest software maker Microsoft today launched the ‘Windows 7’ operating system (OS) with a host of tools for multimedia applications for business and retail customers.
Smarting under the failure of its earlier operating system ‘Vista’, Windows 7 promises significant improvement in productivity levels, enhanced security, reduced risks and costs.
PC makers HCL Infosystems, Acer and Hewlett Packard have started shipping Windows 7 pre-loaded PCs and notebook computers from today.
HP India will retail Windows 7—preloaded PCs at Rs 27,990 to Rs 90,000, company Country Category Manager, Consumer Desktops, Personal Computers, Ketan Patel said.
While, the pre-loaded Windows 7 notebooks will be priced at Rs 39,990 onwards, HP India Consumer Notebooks Category Manager Diptesh Ghosh said.
At the same time, Acer PCs with Windows 7 OS will be priced between Rs 15,000 and Rs 35,000, while the notebooks will be priced at Rs 21,000—Rs 70,000, Acer Chief Sales Officer Harish Kohli said.
HCL Infosystems’ Executive Vice President George Paul said HCL will price it between Rs 16,000 and Rs 55,000, and the notebooks would cost Rs 22,000 to Rs 80,000.
The new version that comes in as many as six editions targeted at different segments has been priced accordingly.
“We have launched Windows 7 in six editions, targeted at specific user groups and would be available on desktops, laptops and netbooks across the varied price range,” Microsoft India Chairman Ravi Venkatesan told reporters in New Delhi.
Off-the-shelf sale
Windows 7 that is available pre-loaded with PCs now can be bought off-the-shelf once the company receives the nod from Customs. Customs clearance is imminent, and the software would be available off-the-shelf as well, Venkatesan said.
While the Home Basic package (off-the-shelf) could cost about Rs 5,800, Windows 7 Ultimate could cost Rs 11,000. A user can save about Rs 500-Rs 800 per desktop in terms of security features and power usage, Mr. Venkatesan believes.
Sixteen Original Equipment Manufacturers (OEMs) will launch about 100 more models by the end of this month with Windows 7 OS installed, he added.
The six editions launched today are: Windows 7 Home Premium (for home consumers), Windows 7 Professional (for small and medium businesses), Windows 7 Starter, Windows 7 Home Basic (for emerging markets), Windows 7 Enterprise and Windows 7 Ultimate.
With a host of new features in Windows 7 like Home Group, Play To, Windows Live Movie the new version aims to do away with flaws that hampered Vista sales.
“These new features along with shorter booting (start-up) time, makes Windows 7 exciting for the consumers,” Venkatesan said. The new version is also equipped to handle multimedia functions better than its predecessor Vista.
Industry analysts have already given a thumbs-up to the new operating system. However, some analysts believe the economic climate, which has hit sales of PCs globally, could in turn, impact sales of Windows 7.
Via: The Hindu
Source: http://beta.thehindu.com/sci-tech/article37207.ece
|
|