Saturday, November 15, 2008

WELCOME

WELCOME

Tuesday, September 30, 2008

Blogging Is Not A Crime

Blogging Is Not A Crime



I found this arresting chart on Swivel. It plots the number of bloggers who have been incarcerated over the past few years, based on data collected by the World Information Access project. The number of incidents it tracks went from five arrests in 2003 to 35 last year. As blogging expands internationally, so do the risk of speaking one’s mind. (Something many of us take for granted).


Most of those arrests are in countries with oppressive regimes, such as Egypt, China, Saudi Arabia, and Iran. But bloggers have been arrested in Canada, France, Greece, and even the U.S. (with Josh Wolf being one of the most famous incidents—he spent the better part of a year in jail for refusing to turn over journalistic video footage to a grand jury).


A few involve cases of alleged terrorism or pedophilia, but the majority involve some form of political speech. Some typical examples:


  • Reza Valizadeh (Iran; November, 2007). “For revealing Iranian president’s overpriced dogs that his security team uses.”
  • Charles Leblanc (Canada; June, 2006): “For taking pictures at a conference for his blog.”
  • Josh Wolf (USA; August, 2006): “For videotaping a burning police car.”
  • Hu Jia (China; December, 2007): “For posting his vocal critiques of human rights abuses and environmental degradation in China and calling the Olympics a ‘human rights disaster.’”
  • Reza Valizadeh (Iran; November, 2007): “For revealing Iranian president’s overpriced dogs that his security team uses.”
  • Nay Phone Latt (Burma; January, 2008): “For posting pictures of monks and people demonstrating on the streets.”


Saturday, September 27, 2008

What is Copy right

Copyright Issues


The hot topic on web always will be Copyright. What is this copyright? And why people won’t allow you to copy their content. This is my target topic today which inspired me to write this article.

Being online from last 2 years, I saw almost all the blogs and sites will include a copyright link mentioning not to copy their content without permission. Are they really taking the rights on that content or just warning the visitors by keeping a simple menu called Copyright. These are all unanswered questions.

But here, is that really necessary to take copyrights or warn users not to copy. I would say it’s not necessary as far as it’s a book or something important you are inventing into web through your blog.

Anyway here am not covering all about copyrights like how to take rights? What to do if anyone violates them? If you are really interested to know them visit labnol.org where Amit covered all those faqs.

But the conclusion from my side is until you are doing something extra which is not reproducible by others, you don’t need to take rights and warn visitors not to copy that. I don’t mind if my visitors copy content from TZI. Because from this I will get link back and intern traffic from that.

But the people who are copying content need to remember that copying content won’t help you anymore. Ofcourse you can take some content or idea from that article or anything limited.

Simple tips to Promote blog ourself

9 Simple tips to Promote blog yourself



I am sharing some of the tips I observed in promoting Blog yourselves. Here you don’t need to ask some one to view your blog or no need to request anyone for anything. You just need to observe and use the resources around you.

Here are some of the sources I observed:

1. Include blog URL in signatures: This is a powerful media to drive the traffic again and again. Naturally you will send tons of mail from your inbox to friends, colleague and to many known and unknown people. So if you include URL in signature, it’s natural that people will click on your URL to know what that is. Here you need to attract them to visit again and again. For that you should have an interesting content on your blog. So just include it and receive the traffic.

One more important thing I forgot to say, People will forward your mail to many people in long run so your URL will travel around the web.

2. Place URL in IM’s: Do place your URL in IM’s like Gtalk, Yahoo messenger, MSN, AOL and etc….

3. Place it in Social Networking Profiles: Yes, do mention URL in profiles of social networking site like Orkut, Facebook, Hi5, MySpace and etc…

4. Submit to Search Engines: Don’t forget to submit your blog to search engines like Google, Yahoo, Live, Cuil and etc…

5. Submit to Social Bookmarking Sites: Promote your content on Social Bookmarking Sites like Digg.com, Reddit.com, StumbleUpon.com, Del.icio.us and etc…

6. Share links with other Bloggers: This is really a powerful trick to drive traffic in the initial stages of your blog. Do share links with Blogs under your niche.

7. Place feed headlines in your other Blogs: If you own multiple blogs, it’s always good to place feed headlines from Feedburner on your blogs. And also place a section called my blogs or my network to let visitors know that you own more that one blog.

8.  Comments on fellow blogsThis is my personal experience; Commenting on other blogs will work like anything. You will get lots of traffic starting from the owner of the blog where you commented to his visitors.

9. Join Blog directories: Now-a-days every Country or City has its own blogging communities maintaining a list of Bloggers from that region or language or etc… By joining in those will drive traffic from your own region or Country.

Did I miss anything? OR Any other you know?

Please share your tips here!

Friday, September 26, 2008

Google Phone


FEATURES of GOOGLE PHONE

Touch screen
Instant access to key information with the touch of a finger
Just tap the screen and go
Google G1

Real Web browsing capabilities
Quick and easy access to the Internet one click away
View more pages and rich Web content on your phone

3MP camera
Capture key moments in high-quality fashion wherever you are
Never worry about blurry photos with auto focus built right in

Customizable home screen
Just drag and drop any of your favorite applications, photos, or folders onto your home screen for quick access to what you use all the time

One-click Google Search
Quick and easy access to the Internet in one click

Video playback
Watch your favorite videos, even YouTube, anywhere
Google G1


3G network and Wi-Fi access*
High-speed 3G network connection for surfing the Web or downloading information quickly and effortlessly
Seamlessly transition to open Wi-Fi networks to surf the Web or download information quickly

Android Market
One-touch access to Android Market
Customize and personalize your device to fit your life with a variety of software applications like games, social networking, and on-the-go shopping
Download the applications wirelessly with just a couple short clicks


QWERTY keyboard
The built-in familiar layout lets you type messages easily without scrolling for the letter you want
Hinged screen slides open to reveal keypad and closes to prevent accidental dialing


Easy access to Google applications
One-touch access to Google applications:
Maps (including satellite, traffic, and street views)
Gmail
YouTube
Calendar
Google Talk
IM/text/e-mail*


Music player
With the 1GB memory card, you'll never be without your favorite tunes

Monday, September 15, 2008

Aliens are there

DO u believe ALIEN'S...........????
IF not see the below pictures
These are the original pictures.
These are seen but the government hiding the truth.


           Alien Image 1

Billion million in digit format

Million: 1,000,000
Billion: 1,000,000,000
Trillion: 1,000,000,000,000
Quintillion: 1,000,000,000,000,000,000
Sextillion: 1,000,000,000,000,000,000,000
Nonillion: 1,000,000,000,000,000,000,000,000,000,000
Centillion: 1 followed by 303 zeros

Do you want to earn money through websites?

Do you want to earn money through websites?
How to Create a Website and Earn Money
Here I am going to discuss about how easy it is to generate money by just sitting in front of your PCs and laptops. All you need to do is buy a web space online or use any free services provided by a number of vendors.

Steps
These days a lot of revenue is being generated by the online advertising. It is not that a small number that one can ignore.
Most of the popular search engines are making billions of dollars by online marketing and advertising.
This is one of the quickest and easiest way to earn money.
For this all you need to do is buy a web space and start creating a website or use free service provided by many vendors online.
In the first case you can get a most appropriate URL (a link to your website) with a .com extension.
In the second case you need to settle with some of the names that the vendor will provide with a very long tail attached with the URL before the .com
If your URL is big then people may not remember you website that easily. But, if you want something free you need to compromise certain things.
Once you decide which way is better then you can go ahead and build a website.
If you are looking for a free web space then you can use google blogger, yahoo blogger, wordpress etc., they will provide you with free web space as well as give you some basic templates which you can use to create a website.
You can find a lot of people now a days using the blogger services and earning very good money.
For using these free services you should create an account with them and they will provide you with some basic templates that are installed in their web servers.
Also, if you don't like their templates you can create a template of your own and upload it to their server.
Once you have the template of your choice, you can go ahead and create your first post.
Keep posting regularly on your web site and then increase traffic to your page.
Now that you have a good number of people reading your blog (otherwise called web traffic) you can also place free ads on your web site which will earn you money.
So, start creating your website today and earn money.

Antivirus for free : Avast

#####
One of the most secured antivirus Avast
providing anti virus for free of cost for home users.
version : Avast 4.8 Home edition.
Key: Free key for persons who registered.
For more details visit www.avast.com
Get it now.....!

Sunday, September 14, 2008

Hackers into BigBang



The hackers reportedly mounted an attack on the Large Hadron Collider, which has raised eyebrows over the security of this historic experiment in the world, as it surpasses a vital milestone.
Scientists say that it was a competition between two hacker groups - known in hacking circles as 2600 and 1337, that led them to break into the experiment just before it was to begin.
2600, also known as the Greek Security Team broke into the experiment and left a message saying, "We are 2600.. don't mess with us..." The scientists who were behind the mammoth experiment had received threatening emails prior to the start.
No real damage done, but the hackers got perilously close. The hackers attacked the Compact Muon Solenoid Experiment, or CMS.
Scientists working at Cern, the organisation that runs the vast smasher, were worried about what the hackers could do because they were "one step away" from the computer control system of one of the huge detectors of the machine, a vast magnet that weighs 12,500 tons, measuring around 21 metres in length and 15 metres wide.
If they had hacked into a second computer network, they could have turned off parts of the vast detector and, said the insider, "it is hard enough to make these things work if no one is messing with it."
Fortunately, only one file was damaged but one of the scientists firing off emails as the CMS team fought off the hackers said it was a "scary experience". The hackers breached the CMSMON system, which monitors the CMS software system. CMS takes vast amounts of data during collisions.

Friday, September 12, 2008

CHROME from GOOGLE

Google released new browser CHROME which is faster in browsing
and wide display area. You can Install it from the following link.
http://www.google.com/chrome/eula.html

Friday, August 29, 2008

N96

SaysN96 has more advantages than Iphone, may costs over 25k


400 GB DVD

Pioneer Released 400 GB DVD



Soon there will be a phase out of those 3.5 GB DVD that you are always using when burning DVD movies.
Pioneer has released on what they claim as the world’s first 16-layer optical disc. With 400 GB Capacity [ An ordinary 3.5 GB DVD ) is only Single Layer.
Right now the technology is Read Only but I do believed that soon they will release the Re-write version of this DVD. But how much will the machine to rewrite this DVD cost?
Let us see what will happen next. Maybe I have to go back to this post after a year?
Anyway, it is really great that Technology is advancing. Just imagine if your regular DVD could hold about 4 movies, this DVD would hold about 200 + Movies.

VISUAL STUDIO 2008 Advantages

Introduction
Visual Studio 2008 code name "Orcas" Beta 2 has just hit the road and, since it is Beta 2, this means Visual Studio 2008 is feature complete and is ready for RTM. Below, we would find a brief introduction of some of the new features introduced with VS 2008 and .NET 3.5 Beta 2.
A quick list of some of the new features are:
Multi-Targeting support
Web Designer and CSS support
ASP.NET AJAX and JavaScript support
Project Designer
Data
LINQ – Language Integrated Query
The features listed and explained in this paper are not complete and this document intends to give you a forehand to start off with VS 2008.
1. Multi-Targeting Support
Earlier, each Visual Studio release only supported a specific version of the .NET Framework. For example, VS 2003 only works with .NET 1.1, and VS 2005 only works with .NET 2.0.
One of the major changes with the VS 2008 release is to support what Microsoft calls "Multi-Targeting". This means that Visual Studio will now support targeting multiple versions of the .NET Framework, and developers will be able to take advantage of the new features that Visual Studio provides without having to migrate their existing projects and deployed applications to use a new version of the .NET Framework.
Now when we open an existing project or create a new one with VS 2008, we can pick which version of the .NET Framework to work with. The IDE will update its compilers and feature-set to match the chosen .NET Framework.
Features, controls, projects, item-templates, and references that do not work with the selected version of the Framework will be made unavailable or will be hidden.
Unfortunately, support has not been included to work with Framework versions 1.1 and earlier. The present release supports 2.0/3.0 and 3.5 .NET Frameworks.
Microsoft plans to continue multi-targeting support in all future releases of Visual Studio.
Creating a New Project with Visual Studio 2008 that Targets .NET 2.0 Framework Library
The screenshots below depict the creation of a new web application targeting .NET 2.0 Framework. Choose File->New Project. As we see in the snapshot below in the top-right of the new project dialog, there is now a dropdown that allows us to choose which versions of the .NET Framework we want to target when we create the new project. The templates available are filtered depending on the version of the Framework chosen from the dropdown:

Can I Upgrade an Existing Project to .NET 3.5?
When we open a solution created using an older version of Visual Studio and Framework, VS 2008 would ask if migration is required. If we opt to migrate, then a migration wizard would start. If we wish to upgrade our project to target a newer version of the Framework at a later point of time, we can pull up the project properties page and choose the Target Framework. The required assemblies are automatically referenced. The snapshot below shows the properties page with the option Target Framework marked.
2. Web Designer, Editing and CSS Support
One feature that web developers will discover with VS 2008 is its drastically improved HTML designer, and the extensive CSS support made available.
The snapshots below depict some of the new web designer features in-built into VS 2008.
Split View Editing
In addition to the existing views, Design view and Code view, VS 2008 brings along the Split view which allows us to view both the HTML source and the Design View at the same-time, and easily make changes in any of the views. As shown in the image below, as we select a tag in code view, the corresponding elements/controls are selected in design view.
CSS Style Manager
VS 2008 introduces a new tool inside the IDE called "Manage Styles". This shows all of the CSS style sheets for the page.
It can be used when we are in any of the views - design, code and split views. Manage Styles tool can be activated by choosing Format -> CSS Styles -> Manage Styles from the menu. A snapshot of the same would look like the following:
Create a new style using the new style dialog window as show in the snapshot below.
Now, the style manager would show .labelcaption style as well in the CSS styles list. However, if we observe that the body element has a circle around it but the .labelcaption does not have one, this is because the style is not in use yet.
We will not select all the labels below and apply our new style .labelcaption.
We can choose to modify the existing style through GUI using "Modify style..." menu option in the dropdown menu as shown above or choose to hand edit the code by choosing the option "Go To Code".
CSS Source View Intellisense
The designer is equipped with the ability to select an element or control in design-view, and graphically select a rule from the CSS list to apply to it.
We will also find when in source mode that we now have intellisense support for specifying CSS class rules. The CSS Intellisense is supported in both regular ASP.NET pages as well as when working with pages based on master pages.
Code Editing Enhancements
Below is a non-exhaustive list of a few new code editing improvements. There are many more about which I don't know yet.
Transparent Intellisense Mode
While using VS 2005/2003 we often find ourselves escaping out of intellisense in order to better see the code around, and then go back and complete what we were doing.
VS 2008 provides a new feature which allows us to quickly make the intellisense drop-down list semi-transparent. Just hold down the "Ctrl" key while the intellisense drop-down is visible and we will be able to switch it into a transparent mode that enables us to look at the code beneath without having to escape out of Intellisense. The screenshot below depicts the same.
Organize C# Using Statements
One of the small, but a nice new feature in VS 2008 is support for better organizing using statements in C#. We can now select a list of using statements, right-click, and then select the "Organize Usings" sub-menu. When we use this command the IDE will analyze what types are used in the code file, and will automatically remove those namespaces that are declared but not required. A small and handy feature for code refactoring.
3. ASP.NET AJAX and JavaScript Support
JavaScript Intellisense
One new feature that developers will find with VS 2008 is its built-in support for JavaScript Intellisense. This makes using JavaScript and building AJAX applications significantly easier. A double click on HTML control in design mode would automatically create a click event to the button and would create the basic skeleton of the JavaScript function. As we see in the depicted image below, JavaScript Intellisense is inbuilt now. Other JavaScript Intellisense features include Intellisense for external JavaScript libraries and adding Intellisense hints to JavaScript functions.
JavaScript Debugging
One new JavaScript feature in VS 2008 is the much-improved support for JavaScript debugging. This makes debugging AJAX applications significantly easier. JavaScript debugging was made available in VS 2005 itself. However, we had to run the web application first to set the breakpoint or use the "debugger" JavaScript statement.
VS 2008 makes this much better by adding new support that allows us to set client-side JavaScript breakpoints directly within your server-side .aspx and .master source files.
We can now set both client-side JavaScript breakpoints and VB/C# server-side breakpoints at the same time on the same page and use a single debugger to step through both the server-side and client-side code in a single debug session. This feature is extremely useful for AJAX applications. The breakpoints are fully supported in external JavaScript libraries as well.
4. Few Other Features and Enhancements
Below is a list of few other enhancements and new features included in Microsoft Visual Studio 2008.
Project Designer
Windows Presentation Foundation (WPF) applications have been added to Visual Studio 2008. There are four WPF project types:
WinFX Windows Application
WinFX Web Browser Application
WinFX Custom Control Library
WinFX Service Library
When a WPF project is loaded in the IDE, the user interface of the Project Designer pages lets us specify properties specific to WPF applications.
Data
Microsoft Visual Studio 2008 Beta 2 includes the following new features to incorporate data into applications:
The Object Relational Designer (O/R Designer) assists developers in creating and editing the objects (LINQ to SQL entities) that map between an application and a remote database
Hierarchical update capabilities in Dataset Designer, providing generated code that includes the save logic required to maintain referential integrity between related tables
Local database caching incorporates an SQL Server Compact 3.5 database into an application and configures it to periodically synchronize the data with a remote database on a server. Local database caching enables applications to reduce the number of round trips between the application and a database server
LINQ – Language Integrated Query
LINQ is a new feature in VS 2008 that broadens great querying capabilities into the language syntax. LINQ introduces patterns for querying and updating data. A set of new assemblies are provided that enable the use of LINQ with collections, SQL databases, and XML documents.
Visual Studio 2008 Debugger
The Visual Studio 2008 debugger has been enhanced with the following features:
Remote debugging support on Windows Vista
Improved support for debugging multithreaded applications
Debugging support for LINQ programming
Debugging support for Windows Communications Foundation
Support for script debugging, including client-side script files generated from server-side script now appear in Solution Explorer
Reporting
Visual Studio 2008 provides several new reporting features and improvements such as:
New Report Projects: Visual Studio 2008 includes two new project templates for creating reporting applications. When we create a new Reports Application project, Visual Studio provides a report (.rdlc) and a form with a ReportViewer control bound to the report.
Report Wizard: Visual Studio 2008 introduces a Report Wizard, which guides us through the steps to create a basic report. After we complete the wizard, we can enhance the report by using Report Designer.
Expression Editor Enhancement: The Expression Editor now provides expressions that we can use directly or customize as required.
PDF Compression: The ReportViewer controls can now compress reports that are rendered or exported to the PDF format.

FOR VISUAL SCREEN SHOTS SEE THIS LINK

OBJECT ORIENTED PROGRAMING CONCEPT

Why Object Oriented approach?
A major factor in the invention of Object-Oriented approach is to remove some of the flaws encountered with the procedural approach. In OOP, data is treated as a critical element and does not allow it to flow freely. It bounds data closely to the functions that operate on it and protects it from accidental modification from outside functions. OOP allows decomposition of a problem into a number of entities called objects and then builds data and functions around these objects. A major advantage of OOP is code reusability.
Some important features of Object Oriented programming are as follows:
Emphasis on data rather than procedure
Programs are divided into Objects
Data is hidden and cannot be accessed by external functions
Objects can communicate with each other through functions
New data and functions can be easily added whenever necessary
Follows bottom-up approach

Concepts of OOP:
Objects
Classes
Data Abstraction and Encapsulation
Inheritance
Polymorphism

Briefly on Concepts:

Objects
Objects are the basic run-time entities in an object-oriented system. Programming problem is analyzed in terms of objects and nature of communication between them. When a program is executed, objects interact with each other by sending messages. Different objects can also interact with each other without knowing the details of their data or code.

Classes
A class is a collection of objects of similar type. Once a class is defined, any number of objects can be created which belong to that class.

Data Abstraction and Encapsulation
Abstraction refers to the act of representing essential features without including the background details or explanations. Classes use the concept of abstraction and are defined as a list of abstract attributes.Storing data and functions in a single unit (class) is encapsulation. Data cannot be accessible to the outside world and only those functions which are stored in the class can access it.

Inheritance
Inheritance is the process by which objects can acquire the properties of objects of other class. In OOP, inheritance provides reusability, like, adding additional features to an existing class without modifying it. This is achieved by deriving a new class from the existing one. The new class will have combined features of both the classes.

Polymorphism
Polymorphism means the ability to take more than one form. An operation may exhibit different behaviors in different instances. The behavior depends on the data types used in the operation. Polymorphism is extensively used in implementing Inheritance.

Advantages of OOP

Object-Oriented Programming has the following advantages over conventional approaches:
OOP provides a clear modular structure for programs which makes it good for defining abstract datatypes where implementation details are hidden and the unit has a clearly defined interface.
OOP makes it easy to maintain and modify existing code as new objects can be created with small differences to existing ones.
OOP provides a good framework for code libraries where supplied software components can be easily adapted and modified by the programmer. This is particularly useful for developing graphical user interfaces.

SOME WALK - IN - WEBSITES

http://www.mywalkin.com/
www.walkins.in/
www.chalowalkin.com/
www.yuvajobs.com/walkin.asp
www.walkinsindia.com
koolkampus.com/walkins/

Sunday, August 10, 2008

I-phone

I-Phone a revolution in mobile world. Cost's 20,000 inr in indian market.





Tuesday, August 5, 2008

HCL OFF CAMPUS AT NISHITA

HCL OFF Campus Placement Drive on 08.08.2008
at Nishitha College of Engineering & Technology
on TECH SUPPPORT
for more details visit www.nishitha.in

main() / void main() / int main() / int main(void) / int main(int argc, char *argv[])

=================================================
main() / void main() / int main() / int main(void) / int main(int argc, char *argv[])


A very common question is "What's the difference between void main and int main?". This particular FAQ tries to answer that and more, covering other versions of the main() implementation.
The first thing to note is that this is one of those topics that people seem to like to argue over for hours, days and more. Some arguments are valid, some are not, and some are just plain old opinion.
The C and C++ standards differ when it comes to main(), so I'll detail each one separately.
For C
Under C89, main() is acceptable, although it is advisable to use the C99 standard, under which only these are acceptable:
int main ( void )int main ( int argc, char *argv[] )
Slight variations of the above are acceptable, where int can be replaced by a typedef name defined as int, or the type of argv can be written as char ** argv, and so on.
The first option is used when you do not require access to the command line arguments.
The names argc and argv are identifiers that can be changed if you so desire, but sticking to argc/argv is convention.
The return type of main() must always be an int, this allows a return code to be passed to the invoker.
Under C89, the return statement at the end of main() is required, whereas under C99 if no return statement is present, return 0 is implied. However, it is good programming practice to always use a return statement, even if you don't have to.
For C++
The following are acceptable uses:
int main ( int argc, char *argv[] )int main ()
The first option follows similar conventions to those used by C99.
The second option is used when you do not require access to the command line arguments, and is equivalent to the int main(void) option used by C99.
Again, the return type must always be an int, and the function should return 0; at the end, but it is not required by the standard.
(C) The difference between int main() and int main(void)
A common misconception for C programmers, is to assume that a function prototyped as follows takes no arguments:
int foo();
In fact, this function is deemed to take an unknown number of arguments. Using the keyword void within the brackets is the correct way to tell the compiler that the function takes NO arguments.
What's the deal with void main()
Under regular function calling/returning in C and C++, if your don't ever want to return anything from a function, you define it's return type as void. For example, a function that takes no arguments, and returns nothing can be prototyped as:
void foo(void);
A common misconception is that the same logic can be applied to main(). Well, it can't, main() is special, you should always follow the standard and define the return type as int. There are some exceptions where void main() is allowed, but these are on specialised systems only. If you're not sure if you're using one of these specialised systems or not, then the answer is simply no, you're not. If you were, you'd know it.
Be warned that if you post your "void main" code on the forums, you're going to get told to correct it. Responding with "my teacher said it's OK" is no defence; teachers have a bad habit of being wrong. Be safe, and post only standard code, and you'll find people concentrate on answering your other problems, rather than waste time telling you about this type of thing.
But what about int main(int argc, char *argv[], char *envp[])
As an extension to the guaranteed standard, an additional parameter to main() can, on some systems, be used to gain access to the environment variables. This is isn't guaranteed to work on all compilers, so use it with care if you want to keep your code portable.
===================================================================

DIFFERENCE BETWEEN MALLOC CALLOC

===============================================================
DIFFERENCE BETWEEN MALLOC CALLOC

Both malloc and calloc do the same thing with almost the same results, they allocate a block of n * sizeof ( T ) bytes of memory. The difference is in how the functions are called and how the memory block is initialized. malloc is called like so:
p = malloc ( n * sizeof ( T ) );
where the user programmer performs the operation to find the final block size. calloc takes two arguments and performs the operation itself:
p = calloc ( n, sizeof ( T ) );
malloc leaves the block of memory uninitialized, but calloc zero fills the memory. This does not mean that
p = calloc ( 1, sizeof ( int * ) );
will result in a pointer to int with a value of NULL. Zero filled memory does not mean that the memory is filled with the data type's equivalent of 0, so this zero fill cannot be relied on except with integral values such as int or char. Pointers and floating point may use a different representation for 0 than all bits zero.
Because of this zero fill, calloc can be slightly less efficient than malloc.

DIFFERENCES BETWEEN C and CPP

===================================================
DIFFERENCES BETWEEN C and CPP

Put simply, C++ is an extended C meant to improve safety, give the programmer more options, simplify higher level programming, and offer a better approach to large scale programming. C++ is also a larger language with more features and complexity than C, but C++ can improve productivity with its greater amount of features. A list of features that C++ supports which C does not includes:
Classes
Member functions
Constructors and destructors
Derived classes
Virtual functions
Abstract classes
Access control (public, private, protected)
friend functions
Pointers to members
static members
mutable members
Operator overloading
References
Templates
Inline functions
Default arguments
Function overloading
Namespaces
Exception handling
Run-time type identification
// comments
True const
Declarations as statements
Automatically typedef'd struct tags
Type safe linkage
new and delete
bool keyword
Safer and more robust casting
===============================================================

DIFFERENCES BETWEEN COUT,PRINTF

=================================================================
DIFFERENCES BETWEEN COUT,PRINTF

printf is a function that takes a variable number of arguments, the first argument being a format string explaining how to treat further arguments. cout is an object of the std::ostream class. The two are completely different in form, yet the result is the same, data sent to stdout.
This question is difficult to answer completely as often phrased since cout and printf are wildly different, but most often one of three questions are meant:
Q: "Which is faster?" A: printf, but the difference is too slight to worry about.
Q: "Which is better?" A: Neither, it depends heavily on personal preference and what needs to be done.
Q: "Which should I use?" A: You should use whichever you feel most comfortable with.It is preferred that you use iostreams with C++ instead of the C functions because iostreams are type safe and extensible for user defined types, both of which are very good reasons.
===================================================================

DIFFERENCES BETWEEN NULL AND 0, \0

==============================================================
DIFFERENCES BETWEEN NULL AND 0, \0

NULL is a macro defined in several standard headers, 0 is an integer constant, '\0' is a character constant, and nul is the name of the character constant. All of these are *not* interchangeable:
NULL is to be used for pointers only since it may be defined as ((void *)0), this would cause problems with anything but pointers.
0 can be used anywhere, it is the generic symbol for each type's zero value and the compiler will sort things out.
'\0' should be used only in a character context.
nul is not defined in C or C++, it shouldn't be used unless you define it yourself in a suitable manner, like:
#define nul '\0'
=============================================================

Saturday, August 2, 2008

APTITUDE QUESTIONS

Aptitude Questions
=================================================================
1.If 2x-y=4 then 6x-3y=?(a)15(b)12(c)18(d)10
Ans. (b)


2.If x=y=2z and xyz=256 then what is the value of x?
(a)12(b)8(c)16(d)6
Ans. (b)


3. (1/10)18 - (1/10)20 = ?(a) 99/1020(b) 99/10(c) 0.9(d) none of these
Ans. (a)


4.Pipe A can fill in 20 minutes and Pipe B in 30 minsand Pipe C canempty the same in 40 mins.If all of them worktogether, find the timetaken to fill the tank(a) 17 1/7 mins(b) 20 mins(c) 8 mins(d) none of these
Ans. (a)

5. Thirty men take 20 days to complete a job working 9hours a day.Howmany hour a day should 40 men work to complete thejob?(a) 8 hrs(b) 7 1/2 hrs(c) 7 hrs(d) 9 hrs
Ans. (b)


6. Find the smallest number in a GP whose sum is 38and product 1728(a) 12(b) 20(c) 8(d) none of these
Ans. (c)


7. A boat travels 20 kms upstream in 6 hrs and 18 kmsdownstream in 4hrs.Find the speed of the boat in still water and thespeed of thewater current?(a) 1/2 kmph(b) 7/12 kmph(c) 5 kmph(d) none of these
Ans. (b)


8. A goat is tied to one corner of a square plot ofside 12m by a rope7m long.Find the area it can graze?(a) 38.5 sq.m(b) 155 sq.m(c) 144 sq.m(d) 19.25 sq.m
Ans. (a)


9. Mr. Shah decided to walk down the escalator of atube station. Hefound that if he walks down 26 steps, he requires 30seconds toreach the bottom. However, if he steps down 34 stairshe would onlyrequire 18 seconds to get to the bottom. If the timeis measured fromthe moment the top step begins to descend to thetime he steps offthe last step at the bottom, find out the height ofthe stair way insteps?
Ans.46 steps.


10. The average age of 10 members of a committee isthe same as it was4 years ago, because an old member has been replacedby a youngmember. Find how much younger is the new member ?
Ans.40 years.


11. Three containers A, B and C have volumes a, b, andc respectively;and container A is full of water while the other twoare empty. Iffrom container A water is poured into container Bwhich becomes 1/3full, and into container C which becomes 1/2 full, howmuch water isleft in container A?


12. ABCE is an isosceles trapezoid and ACDE is arectangle. AB = 10and EC = 20. What is the length of AE?
Ans. AE = 10.

13. In the given figure, PA and PB are tangents to thecircle at A andB respectively and the chord BC is parallel totangent PA. If AC = 6cm, and length of the tangent AP is 9 cm, then whatis the length ofthe chord BC?
Ans. BC = 4 cm.


15 Three cards are drawn at random from an ordinarypack of cards.Find the probability that they will consist of a king,a queen and an ace.
Ans. 64/2210.


16. A number of cats got together and decided to killbetween them999919 mice. Every cat killed an equal number ofmice. Each catkilled more mice than there were cats. How many catsdo you thinkthere were ?
Ans. 991.


17. If Log2 x - 5 Log x + 6 = 0, then what would thevalue / values ofx be?
Ans. x = e2 or e3.


18. The square of a two digit number is divided byhalf the number.After 36 is added to the quotient, this sum is thendivided by 2.The digits of the resulting number are the same asthose in theoriginal number, but they are in reverse order. Theten's place ofthe original number is equal to twice the differencebetween itsdigits. What is the number?
Ans. 46


19.Can you tender a one rupee note in such a mannerthat there shallbe total 50 coins but none of them would be 2 paisecoins.?
Ans. 45 one paisa coins, 2 five paise coins, 2 tenpaise coins, and 1twenty-five paise coins.


20.A monkey starts climbing up a tree 20ft. tall. Eachhour, it hops3ft. and slips back 2ft. How much time would it takethe monkey toreach the top?
Ans.18 hours.


21. What is the missing number in this series? 8 214 6 11 ? 14 6 18 12
Ans. 9


22. A certain type of mixture is prepared by mixingbrand A at Rs.9 akg. with brand B at Rs.4 a kg. If the mixture is worthRs.7 a kg., howmany kgs. of brand A are needed to make 40kgs. ofthe mixture?
Ans. Brand A needed is 24kgs.


23. A wizard named Nepo says "I am only three times myson's age. Myfather is 40 years more than twice my age. Togetherthe three of usare a mere 1240 years old." How old is Nepo?Ans. 360 years old.


24. One dog tells the other that there are two dogs infront of me.The other one also shouts that he too had two behindhim. How many arethey?
Ans. Three.


25. A man ate 100 bananas in five days, each dayeating 6 more thanthe previous day. How many bananas did he eat on thefirst day?
Ans. Eight.


26. If it takes five minutes to boil one egg, how longwill it take toboil four eggs?
Ans. Five minutes.


27. The minute hand of a clock overtakes the hour handat intervals of64 minutes of correct time. How much a day does theclock gain or lose?
Ans. 32 8/11 minutes.


28. Solve for x and y: 1/x - 1/y = 1/3, 1/x2 + 1/y2= 5/9.Ans. x = 3/2 or -3 and y = 3 or -3/2.
29. Daal is now being sold at Rs. 20 a kg. During lastmonth its ratewas Rs. 16 per kg. By how much percent should a familyreduce itsconsumption so as to keep the expenditure fixed?
Ans. 20 %.


30. Find the least value of 3x + 4y if x2y3 = 6.Ans. 10.31. Can you find out what day of the week was January12, 1979?
Ans. Friday.


32. A garrison of 3300 men has provisions for 32 days,when given at arate of 850 grams per head. At the end of 7 days areinforcementarrives and it was found that now the provisions willlast 8 daysless, when given at the rate of 825 grams per head.How, many more mencan it feed?
Ans. 1700 men.


33. From 5 different green balls, four different blueballs and threedifferent red balls, how many combinations of ballscan be chosentaking at least one green and one blue ball?
Ans. 3720.


34. Three pipes, A, B, & C are attached to a tank. A &B can fill itin 20 & 30 minutes respectively while C can empty itin 15 minutes.If A, B & C are kept open successively for 1 minuteeach, how soonwill the tank be filled?
Ans. 167 minutes.


35. A person walking 5/6 of his usual rate is 40minutes late. What ishis usual time?
Ans. 3 hours 20 minutes.


36.For a motorist there are three ways going from CityA to City C. Byway of bridge the distance is 20 miles and toll is$0.75. A tunnelbetween the two cities is a distance of 10 miles andtoll is $1.00 forthe vehicle and driver and $0.10 for each passenger. Atwo-lanehighway without toll goes east for 30 miles to city Band then 20miles in a northwest direction to City C.
1. Which is the shortest route from B to C
(a) Directly on toll free highway to City C(b) The bridge(c) The Tunnel(d) The bridge or the tunnel(e) The bridge only if traffic is heavy on the tollfree highway
Ans. (a)
2. The most economical way of going from City A toCity B, in terms oftoll and distance is to use the
(a) tunnel(b) bridge(c) bridge or tunnel(d) toll free highway(e) bridge and highway
Ans. (a)
3. Jim usually drives alone from City C to City Aevery working day.His firm deducts a percentage of employee pay forlateness. Whichfactor would most influence his choice of the bridgeor the tunnel ?
(a) Whether his wife goes with him(b) scenic beauty on the route(c) Traffic conditions on the road, bridge and tunnel(d) saving $0.25 in tolls(e) price of gasoline consumed in covering additional10 miles on thebridge
Ans. (a)
4. In choosing between the use of the bridge and thetunnel the chieffactor(s) would be:I. Traffic and road conditionsII. Number of passengers in the carIII. Location of one's homes in the center oroutskirts of one of thecitiesIV. Desire to save $0.25
(a) I only(b) II only(c) II and III only(d) III and IV only(e) I and II only
Ans. (a)


37.The letters A, B, C, D, E, F and G, not necessarilyin that order,stand for seven consecutive integers from 1 to 10D is 3 less than AB is the middle termF is as much less than B as C is greater than DG is greater than F
1. The fifth integer is(a) A(b) C(c) D(d) E(e) F
Ans. (a)
2. A is as much greater than F as which integer isless than G(a) A(b) B(c) C(d) D(e) E
Ans. (a)
3. If A = 7, the sum of E and G is(a) 8(b) 10(c) 12(d) 14(e) 16
Ans. (a)
4. A - F = ?(a) 1(b) 2(c) 3(d) 4(e) Cannot be determined
Ans. (a)
5. An integer T is as much greater than C as C isgreater than E. Tcan be written as A + E. What is D?(a) 2(b) 3(c) 4(d) 5(e) Cannot be determined
Ans. (a)
6. The greatest possible value of C is how muchgreater than thesmallest possible value of D?(a) 2(b) 3(c) 4(d) 5(e) 6
Ans. (a)


38.1. All G's are H's2. All G's are J's or K's3. All J's and K's are G's4. All L's are K's5. All N's are M's6. No M's are G's
1. If no P's are K's, which of the following must betrue?
(a) All P's are J's(b) No P is a G(c) No P is an H(d) If any P is an H it is a G(e) If any P is a G it is a J
Ans. (a)
2. Which of the following can be logically deducedfrom the conditionsstated?
(a) No M's are H's(b) No M's that are not N's are H's(c) No H's are M's(d) Some M's are H's(e) All M's are H's
Ans. (a)
3. Which of the following is inconsistent with one ormore of theconditions?
(a) All H's are G's(b) All H's that are not G's are M's(c) Some H's are both M's and G's(d) No M's are H's(e) All M's are H's
Ans. (a)
4. The statement "No L's are J's" isI. Logically deducible from the conditions statedII. Consistent with but not deducible from theconditions statedIII. Deducible from the stated conditions togetherwith the additionalstatement "No J's are K's"
(a) I only(b) II only(c) III only(d) II and III only(e) Neither I, II nor III
Ans. (a)


39.In country X, democratic, conservative and justiceparties havefought three civil wars in twenty years. TO restorestability anagreement is reached to rotate the top officesPresident, PrimeMinister and Army Chief among the parties so that eachparty controlsone and only one office at all times. The three topoffice holdersmust each have two deputies, one from each of theother parties. Eachdeputy must choose a staff composed of equally membersof his or herchiefs party and member of the third party.
1. When Justice party holds one of the top offices,which of thefollowing cannot be true
(a) Some of the staff members within that office arejustice party members(b) Some of the staff members within that office aredemocratic partymembers(c) Two of the deputies within the other offices arejustice party members(d) Two of the deputies within the other offices areconservativeparty members(e) Some of the staff members within the other officesare justiceparty members.
Ans. (a)
2. When the democratic party holds presidency, thestaff of the primeminister's deputies are composedI. One-fourth of democratic party membersII. One-half of justice party members and one-fourthof conservativeparty membersIII. One-half of conservative party members andone-fourth of justiceparty members.
(a) I only(b) I and II only(c) II or III but not both(d) I and II or I and III(e) None of these
Ans. (a)
3. Which of the following is allowable under the rulesas stated:
(a) More than half of the staff within a given officebelonging to asingle party(b) Half of the staff within a given office belongingto a single party(c) Any person having a member of the same party ashis or herimmediate superior(d) Half the total number of staff members in allthree officesbelonging to a single party(e) Half the staff members in a given office belongingto partiesdifferent from the party of the top office holder inthat office.
Ans. (a)
4. The office of the Army Chief passes fromConservative to Justiceparty. Which of the following must be fired.
(a) The democratic deputy and all staff membersbelonging to Justice party(b) Justice party deputy and all his or hers staffmembers(c) Justice party deputy and half of his Conservativestaff members inthe chief of staff office(d) The Conservative deputy and all of his or herstaff membersbelonging to Conservative party(e) No deputies and all staff members belonging toconservative parties.
Ans. (a)


40.In recommendations to the board of trustees atuition increase of$500 per year, the president of the university said"There were nostudent demonstrations over the previous increases of$300 last yearand $200 the year before". If the president'sstatement is accuratethen which of the following can be validly inferredfrom theinformation given:I. Most students in previous years felt that theincreases werejustified because of increased operating costs.II. Student apathy was responsible for the failure ofstudents toprotest the previous tuition increases.III. Students are not likely to demonstrate over newtuition increases.
(a) I only(b) II only(c) I or II but not both(d) I, II and III(e) None
Ans. (a)


41. The office staff of XYZ corporation presentlyconsists of threebookeepers--A, B, C and 5 secretaries D, E, F, G, H.The management isplanning to open a new office in another city using 2bookeepers and 3secretaries of the present staff . To do so they planto seperatecertain individuals who don't function well together.The followingguidelines were established to set up the new officeI. Bookeepers A and C are constantly finding faultwith one anotherand should not be sent together to the new office as ateamII. C and E function well alone but not as a team ,they should beseperatedIII. D and G have not been on speaking terms andshouldn't go togetherIV Since D and F have been competing for promotionthey shouldn't be ateam1.If A is to be moved as one of the bookeepers,whichof the followingcannot be a possible working unit.
A.ABDEHB.ABDGHC.ABEFHD.ABEGH
Ans.B
2.If C and F are moved to the new office,how manycombinations arepossible
A.1B.2C.3D.4
Ans.A
3.If C is sent to the new office,which member of thestaff cannot gowith C
A.BB.DC.FD.G
Ans.B
4.Under the guidelines developed,which of thefollowing must go to thenew office
A.BB.DC.ED.G
Ans.A
5.If D goes to the new office,which of the followingis/are true
I.C cannot goII.A cannot goIII.H must also go
A.I onlyB.II onlyC.I and II onlyD.I and III only
Ans.D


42.After months of talent searching for anadministrative assistant tothe president of the college the field of applicantshas been narroweddown to 5--A, B, C, D, E .It was announced that thefinalist would bechosen after a series of all-day group personalinterviews wereheld.The examining committee agreed upon the followingprocedure
I.The interviews will be held once a weekII.3 candidates will appear at any all-day interviewsessionIII.Each candidate will appear at least onceIV.If it becomes necessary to call applicants foradditonalinterviews, no more 1 such applicant should be askedto appear thenext weekV.Because of a detail in the written applications,itwas agreed thatwhenever candidate B appears, A should also bepresent.VI.Because of travel difficulties it was agreed that Cwill appear foronly 1 interview.1.At the first interview the following candidatesappear A,B,D.Whichof the follwing combinations can be called for theinterview to beheld next week.
A.BCDB.CDEC.ABED.ABC
Ans.B
2.Which of the following is a possible sequence ofcombinations forinterviews in 2 successive weeks
A.ABC;BDEB.ABD;ABEC.ADE;ABCD.BDE;ACD
Ans.C
3.If A ,B and D appear for the interview and D iscalled foradditional interview the following week,which 2candidates may beasked to appear with D?
I. AII BIII.CIV.EA.I and IIB.I and III onlyC.II and III onlyD.III and IV only
Ans.D
4.Which of the following correctly state(s) theprocedure followed bythe search committee
I.After the second interview all applicants haveappeared at least onceII.The committee sees each applicant a second timeIII.If a third session,it is possible for allapplicants to appear atleast twice
A.I onlyB.II onlyC.III onlyD.Both I and II
Ans.A


43. A certain city is served by subway lines A,B and Cand numbers 1 2and 3When it snows , morning service on B is delayedWhen it rains or snows , service on A, 2 and 3 aredelayed both in themorning and afternoonWhen temp. falls below 30 degrees farenheit afternoonservice iscancelled in either the A line or the 3 line,but not both.When the temperature rises over 90 degrees farenheit,the afternoonservice is cancelled in either the line C or the3 line but not both.When the service on the A line is delayed orcancelled, service on theC line which connects the A line, is delayed.When service on the 3 line is cancelled, service onthe B line whichconnects the 3 line is delayed.
Q1. On Jan 10th, with the temperature at 15 degreefarenheit, itsnows all day. On how many lines will service beaffected, including both morning and afternoon.(A) 2(B) 3(C) 4(D) 5Ans. D
Q2. On Aug 15th with the temperature at 97 degreesfarenheit it beginsto rain at 1 PM. What is the minimum numberof lines on which service will be affected?(A) 2(B) 3(C) 4(D) 5Ans. C
Q3. On which of the following occasions would servicebe on thegreatest number of lines disrupted.(A) A snowy afternoon with the temperature at 45degree farenheit(B) A snowy morning with the temperature at 45 degreefarenheit(C) A rainy afternoon with the temperature at 45degree farenheit(D) A rainy afternoon with the temperature at 95degree farenheitAns. B


44. In a certain society, there are two marriagegroups, red andbrown. No marriage is permitted within a group. Onmarriage, malesbecome part of their wives groups; women remain intheir own group.Children belong to the same group as their parents.Widowers anddivorced males revert to the group of their birth.Marriage to morethan one person at the same time and marriage to adirect descendantare forbiddenQ1. A brown female could have hadI. A grandfather born RedII. A grandmother born RedIII Two grandfathers born Brown(A) I only(B) III only(C) I, II and III(D) I and II onlyAns. D
Q2. A male born into the brown group may have(A) An uncle in either group(B) A brown daughter(C) A brown son(D) A son-in-law born into red groupAns. A
Q3. Which of the following is not permitted under therules as stated.(A) A brown male marrying his father's sister(B) A red female marrying her mother's brother(C) A widower marrying his wife's sister(D) A widow marrying her divorced daughter'sex-husbandAns. B
Q4. If widowers and divorced males retained theirgroup they had uponmarrying which of the following would be permissible (Assume that noprevious marriage occurred)(A) A woman marrying her dead sister's husband(B) A woman marrying her divorced daughter'sex-husband(C) A widower marrying his brother's daughter(D) A woman marrying her mother's brother who is awidower.Ans. D
Q5. I. All G's are H'sII. All G's are J's or K'sIII All J's and K's are G'sIV All L's are K'sV All N's are M'sVI No M's are G's


45. There are six steps that lead from the first tothe second floor.No two people can be on the same stepMr. A is two steps below Mr. CMr. B is a step next to Mr. DOnly one step is vacant ( No one standing on that step)Denote the first step by step 1 and second step bystep 2 etc.1. If Mr. A is on the first step, Which of thefollowing is true?(a) Mr. B is on the second step(b) Mr. C is on the fourth step.(c) A person Mr. E, could be on the third step(d) Mr. D is on higher step than Mr. C.Ans: (d)2. If Mr. E was on the third step & Mr. B was on ahigher step thanMr. E which step must be vacant(a) step 1(b) step 2(c) step 4(d) step 5(e) step 6Ans: (a)

3. If Mr. B was on step 1, which step could A be on?(a) 2&e only(b) 3&5 only(c) 3&4 only(d) 4&5 only(e) 2&4 onlyAns: (c)
4. If there were two steps between the step that A wasstanding andthe step that B was standing on, and A was on a higherstep than D , Amust be on step(a) 2(b) 3(c) 4(d) 5(e) 6Ans: (c)
5. Which of the following is false
i. B&D can be both on odd-numbered steps in oneconfigurationii. In a particular configuration A and C must eitherboth an oddnumbered steps or both an even-numbered stepsiii. A person E can be on a step next to the vacantstep.(a) i only(b) ii only(c) iii only(d) both i and iiiAns: (c)


46. Six swimmers A, B, C, D, E, F compete in a race.The outcome is asfollows.i. B does not win.ii. Only two swimmers separate E & Diii. A is behind D & Eiv. B is ahead of E , with one swimmer interveningv. F is a head of D1. Who stood fifth in the race ?(a) A(b) B(c) C(d) D(e) EAns: (e)2. How many swimmers seperate A and F ?(a) 1(b) 2(c) 3(d) 4(e) cannot be determinedAns: (d)3. The swimmer between C & E is(a) none(b) F(c) D(d) B(e) AAns: (a)
4. If the end of the race, swimmer D is disqualifiedby the Judgesthen swimmer B finishes in which place(a) 1(b) 2(c) 3(d) 4(e) 5Ans: (b)


47. Five houses lettered A,B,C,D, & E are built in arow next to eachother. The houses are lined up in the order A,B,C,D, &E. Each of thefive houses has a colored chimney. The roof andchimney of eachhousemust be painted as follows.i. The roof must be painted either green,red ,oryellow.ii. The chimney must be painted either white, black,or red.iii. No house may have the same color chimney as thecolor of roof.iv. No house may use any of the same colors that theevery next houseuses.v. House E has a green roof.vi. House B has a red roof and a black chimney
1. Which of the following is true ?(a) At least two houses have black chimney.(b) At least two houses have red roofs.(c) At least two houses have white chimneys(d) At least two houses have green roofs(e) At least two houses have yellow roofsAns: (c)
2. Which must be false ?(a) House A has a yellow roof(b) House A & C have different color chimney(c) House D has a black chimney(d) House E has a white chimney(e) House B&D have the same color roof.Ans: (b)
3. If house C has a yellow roof. Which must be true.(a) House E has a white chimney(b) House E has a black chimney(c) House E has a red chimney(d) House D has a red chimney(e) House C has a black chimneyAns: (a)
4. Which possible combinations of roof & chimney canhouseI. A red roof 7 a black chimneyII. A yellow roof & a red chimneyIII. A yellow roof & a black chimney
(a) I only(b) II only(c) III only(d) I & II only(e) I&II&IIIAns: (e)


48. Find x+2y(i). x+y=10(ii). 2x+4y=20



49. Is angle BAC is a right angle(i) AB=2BC(2) BC=1.5AC


50. Is x greater than y(i) x=2k(ii) k=2y
===================================================================

APTITUDE QUESTIONS

=============================================

APTITUDE QUESTIONS WITH ANSWERS AND EXPLANATION


100 Puzzles with Answers and Explanation
http://www.eurl.in/u/Puzzles_with_Answers


Collection of Aptitude Questions with Answers Part -1
http://www.eurl.in/u/Aptitude_Part_1


Collection of Aptitude Questions with Answers Part - 2
http://www.eurl.in/u/Aptitude_Part_2


Collection of Aptitude Questions with Answers Part - 3
http://www.eurl.in/u/Aptitude_Part_3


Collection of Numerical Ability Questions Asked in Different Companies
http://www.eurl.in/u/Numerical-Ability


Collection of Reasoning Questions Asked in Different Companies
http://www.eurl.in/u/Reasoning


Collection of Verbal Questions Asked in Different Companies
http://www.eurl.in/u/Verbal

=============================================================

Friday, August 1, 2008

REQUIREMENT ON RIKTAM TECHNOLOGIES

send u r resume to riktam@gmail.com

1. Test would consist of 2 rounds of aptitude test (Analytical / Logical / Puzzles). Interviewer may ask basic C/C++/Java questions, but very less.
2. There is no fees to attend the test
3. Your friends can also attend the aptitude test for selection. They should email their resume to
riktam@gamil.com

if your cv mathes our requirement u will get immedaite mails stating the written test details.

HR manager....( Riktam Technologies ).. Prasad K9848558696

BPO and TECH SUPPORT

Hyderabad Jumbo Job Fair - 2008 On August 02, 03 At Hyderabad Walk-in Date: August 02 & 03 Time: 10.00am - 6.00 pm Venue: Hitex Exhibition Centre, Madhapur, Hitech City Hyderabad-500032..


BPO and TECH SUPPORT ONLY

Monday, July 28, 2008

ORACLE INTRODUCTIN

ORACLE INTRODUCTION

Before database was invented, File system is used to store data in computers. Because of the disadvantages like data redundancy, atomicity, consistency and security in file system, Database Management System (DBMS) was introduced. Collection of related data is called as Database. Collection of inter-related data and a set of programs to access those data is called as Database Management Sysytem (DBMS). Oracle is a Database Management System Software.

After DBMS came in to practice, several models are proposed in DBMS with different types of storage methods for the data within the database. Among them Relational Database Model is the widely used data model. Relational Database model was proposed by E.F.Codd. In Relational Database Model, Data is stored in the form of relations or tables. A table is comprised of rows and columns. A row is also called as a Tuple and a column is called as an Attribute. Relational Database Model was developed based on the concepts of Relational Algebra and Relational Calculus.

Another development in DBMS is introducing Object Oriented Programming (OOP) concepts in DBMS. By this concept, new database models called Object Oriented Database Models were introduced. A new model called Object Relational Database Model was developed by incorporating OOPS concepts in relational database model.

Upto Version 7.3, Oracle is Relational Database Management System Software. But from version 8.0 onwards, Oracle is Object Relational Database Management System Software (ORDBMS). After version 8.0, Oracle version 8i was released. In this version, Oracle has provided the features by using which we can interact with the Internet. After Version 8i, another version 9i was released. Most of the new features in 9i are towards the Architecture and DBA related and some new features are added towards application development side.

Oracle Provides several tools to access the database. Among them the tools that are covered in this book are SQL, PL/SQL, FORMS and REPORTS. Forms and Reports are combinedly called as Developer/2000 or simply D2k. New version of D2k is 6i and is released along with database release 8i.

SQL Introduction and Data Types

SQL ( Structured Query Language )

SQL is a common language to interact with the database in any RDBMS software.
IBM Corporation first developed SQL. They have developed SQL as a part of
System-R project. After recognizing the ease and flexibility of this part, they have developed it as a separate language and named it as SEQUEL (Structured English Query Language).
Oracle Corporation first commercially released SEQUEL by changing its name to SQL.

Features Of SQL

SQL is a 4th generation (4 GL) or Non procedural language.
Every statement in SQL must end with a semicolon.
SQL is not a case sensitive language.
In SQL at a time a single SQL statement is stored in buffer. To re-execute the statement stored in buffer we have to use ‘/’.
In SQL a single SQL statement can be broken into more than one line without using any continuation character.

Datatypes In SQL

To represent data in database we have to create tables. During the creation of a table we have to specify the columns to be included in the table and the type of values that are going to be stored in those columns. The data types available in SQL are as follows.

Number :
This data type is used to store numeric values in a column. For number datatype maximum allowed digits is specified in parantheses. For example, if we specify the datatype as number(5) then we can store –99,999 to +99,999 in that column.

Char :
This data type is used to store fixed length character data. Max. Allowed size for Char is 1000 bytes.

Varchar2 :
This data type is used to store variable length character data. Max. Allowed Size for varchar2 is 2000 bytes. Difference between char and varchar2 is if we specify the datattype as char(10) and stored the string “Oracle” then even the given string contains 6 characters it occupies 10 bytes in memory by placing blank spaces towards the end. if we specify the datatype as varchar2(10) then it occupies only 6 bytes even max. size is 10.
Long : This data type is used to store variable length character data up to 2 GB.

Raw : This data type is used to store binary data up to 1000 bytes. Binary data means pictures and sounds.

Long Raw :
This data type is used to store binary data up to 2 GB.

Date :

This data type is used to store dates in a column. Default Date format in Oracle is DD – MON – YY (Ex: 12-AUG-02).

CONSTRAINTS

Constraints In O R A C L E


Constraints are nothing but conditions given on a column to maintain data integrity within the database. A constraint clause can constrain a single column or group of columns in a table. The point of these constraints is to get oracle to do most of the work in maintaining the integrity of your database. The more constraints you add to a table definition, the less work you have to do in applications to maintain the data. On the other hand, the more constraints there are in a table, the longer it takes to update the data.
There are two ways to specify constraints. As part of the column definition (a column constraint) or at the end of the create table statement (a table constraint). Clauses that constrain several columns must be table constraints. Constraints in Oracle and their purpose are as follows.

1. Not Null : This constraint is used to restrict the user from inserting null values into a column.

2. Unique : This constraint is used to restrict the user from inserting duplicate values to a column.

3. Primary Key : This constraint is used to restrict the user from inserting duplicate values or null values into a column. Another purpose of Primary Key is a column to be referenced by a Foreign Key must be a Primary Key. Oracle allows only one primary key for the table.

4. Foreign Key : This constraint is used to create relationship between two tables. We create relationship between two tables by giving reference to a primary key column of one table to a column in second table, which is called foreign key column. Foreign Key constraint allows either null values or the values present in a Primary Key column to which it refers.
When a relationship is created between two tables then the table that contains Primary Key is called as Master or parent Table and the table that contains Foreign Key is called as Detailed or child Table and the Primary Key and Foreign Key relationship is called as Master Detail Relationship.
A Foreign Key constraint is also called as Referential Integrity constraint. If a Foreign Key refers to a Primary Key present in the same table then that foreign key is called as Self Referential Key.
The clause on delete cascade added to the references clause tells oracle to delete the dependent row when you delete the corresponding row in the parent table. This action automatically maintaince referential integrity.

5. Check : Many columns must have values that are within a certain range or that satisfy certain conditions. A column level check constraint can’t refer to values in other rows. It can’t use the pseudo columns sysdate, uid, user, userenv, currval, nextval, level or rownum. You can use the table constraint form to refer to multiple columns in a check constraint.

CREATING TABLE, TABLE LEVEL CONSTRAINT

Creating A Table


To create your own table in oracle, “Create Table” command is used. Create Table command has the following syntax.



Create Table TabName
(col1 datatype [constraint constname] [constspec],
col2 datatype [constraint constname] [constspec],
.
.
.
coln datatype [constraint constname] [constspec]
);

Here Col1, Col2, … , Coln are the column names to be included in the table. Datatype is any valid datatype of SQL. Constraint is keyword. Constname is the name for the constraint specifying on that column. Constspec is the constraint to be given on that column. Specifying constraint name is optional. When you want to give a name to the constraint, then only you have to use the key word constraint. If we don’t specify a name to the constraint, then oracle will automatically give a name to that constraint. You can get the constraint names from data dictionary view user_constraints. Most of oracle’s generated constraint names are of the form SYS_C######. For example, SYS_C000145. Even specifying a constraint on a column is also optional.
These are the basic elements of this command.
The words create table
The name of the table
An opening paranthesis
Column definitions
A closing paranthesis
A SQL terminator

The individual column definitions are separated by commas. There is no comma after the last column definition. The table and column names must start with a letter of the alphabet, but may include letters, numbers, and underscores. Names may be 1 to 30 characters in length, must be unique within the table, and can not be an oracle reserved word.
Example :

Create Table STUDENT
(Sno Number(5) constraint SNO_PK Primary Key,
Sname Varchar2(15) NOT NULL,
Address Varchar2(20) NOT NULL,
Course Varchar2(1) NOT NULL,
Fee Number(7,2)
);

Example :

Create table Marks
(Sno Number(5) constraint SNO_FK references Student(Sno),
M1 Number(3) constraint M1_CHK Check(M1<=100),
M2 Number(3) constraint M2_CHK Check(M2<=100),
M3 Number(3) constraint Mn_CHK Check(M3<=100),
Total Number(5),
Aveg Number(7,2)
);


Table Level Constraints

Constraints can be classified into column level constraints and table level constraints. If constraint was specified immediately after column definition then that constraint is called as column level constraint and if a constraint was specified at the end of the create table statement, then that constraint is called as table level constraint. Table level constraints are generally used when constraint has to be given on more than one column. An example of table level constraint is as follows. In this example, primary key constraint is given on two columns invno and itemno.

Create table Invoice
(Invno number(5) ,
Cname varchar2(20) not null,
Itemno number(5),
Qty number(3) not null,
Uprice number(7,2) not null,
Constraint invitem_pk primary key(invno,itemno)
);

Creating a Table From Another Table


To create a new table from an existing table, the following syntax is used.

Syntax : create table tablename as select statement on the source table;
Example : the following example creates emp1 by selecting the structure and rows of emp table.

Create table Emp1 as select * from emp;

Displaying Structure of The Table

To display the structure of a table i.e. the column names and their data types, describe command is used.

Syntax : DESC TableName