google.com, pub-4617457846989927, DIRECT, f08c47fec0942fa0 Learn to enjoy every minute of your life.Only I can change my life.: 2014

Saturday, December 13, 2014

E-Commerce



E-Commerce:-

Electronic commerce, commonly known as E-commerce or eCommerce, is trading in products or services using computer networks, such as the Internet. Electronic commerce draws on technologies such as mobile commerce, electronic funds transfer, supply chain management, Internet marketing, online transaction processing, electronic data interchange (EDI),Electronic Funds Transfer(EFT), inventory management systems, and automated data collection systems. Modern electronic commerce typically uses the World Wide Web for at least one part of the transaction's life cycle, although it may also use other technologies such as e-mail
Electronic money or e-money, is an evolving term that can have different meanings but in principle involves the use of computer networks and digital stored value systems to store and transmit money. It may have official legal status or not. It may be historical, current or theoretical.

The underlying principle of electronic money involves the use of computer networks such as the Internet and digital stored value systems. Examples of electronic money are bank deposits, electronic funds transfer, direct deposit, payment processors, and digital currencies.

Electronic money can be understood as a way of storing and transmitting conventional money through electronic systems or as digital currency which varies in value and is tradeable as a currency in its own right.

E-Commerce advantages can be broadly classified in three major categories:
Advantages to Organizations:-
1) Using E-Commerce, organization can expand their market to national and international markets with minimum capital investment. An organization can easily locate more customers, best suppliers and suitable business partners across the globe.
2) E-commerce improves the brand image of the company.
3) E-commerce helps organization to provide better customer services
4) E-Commerce reduces paper work a lot.

Advantages to Consumers:-
1) 24x7 support. Customer can do transactions for the product or enquiry about any product/services provided by a company any time, any where from any location. Here 24x7 refers to 24 hours of each seven days of a week.
2) E-Commerce application provides user more options and quicker delivery of products.
3) E-Commerce provides option of virtual auctions.
4) A customer can put review comments about a product and can see what others are buying or see the review comments of other customers before making a final buy.


Advantages to Society:-
1) Customers need not to travel to shop a product thus less traffic on road and low air pollution.
2) E-Commerce helps reducing cost of products so less affluent people can also afford the products.
3) E-Commerce has enabled access to services and products to rural areas as well which are otherwise not available to them.
4) E-Commerce helps government to deliver public services like health care, education, social services at reduced cost and in improved way.


E-Commerce disadvantages can be broadly classified in two major categories:
1)Technical disadvantages
i)There can be lack of system security, reliability or standards owing to poor implementation of e-Commerce.
ii)Software development industry is still evolving and keeps changing rapidly.
iii)There could be software/hardware compatibility issue as some E-Commerce software may be incompatible with some operating system or any other component.
iv) Sometimes, it becomes difficult to integrate E-Commerce software or website with the existing application or databases.

2) Non-Technical disadvantages:-
i)Security/ Privacy: Difficult to ensure security or privacy on online transactions.
ii)Internet access is still not cheaper and is inconvenient to use for many potential customers like one living in remote villages.
iii)Lack of touch or feel of products during online shopping.
iv) Initial cost: The cost of creating / building E-Commerce application in-house may be very high. There could be delay in launching the E-Commerce application due to mistakes, lack of experience.
v) User resistance: User may not trust the site being unknown faceless seller. Such mistrust makes it difficult to make user switch from physical stores to online/virtual stores.

Thursday, December 11, 2014

Multimedia


Multimedia refers to content that uses a combination of different content forms. This contrasts with media that use only rudimentary computer displays such as text-only or traditional forms of printed or hand-produced material. Multimedia includes a combination of text, audio, still images, animation, video, or interactivity content forms.

Categories of multimedia:-Multimedia may be broadly divided into
1.Linear and
2.Interactive (Non-linear).

Linear active content progresses often without any navigational control for the viewer such as a cinema presentation. Non-linear uses interactivity to control progress as with a video game or self-paced computer based training. Hypermedia is an example of non-linear content.
Multimedia presentations can be live or recorded. A recorded presentation may allow interactivity via a navigation system. A live multimedia presentation may allow interactivity via an interaction with the presenter or performer.

Components of multimedia:-
1) Computer System: Workstation,MPEG/Video/DSP
2) Communication Networks : Token Ring,FDDI , Ethernet,Intranet,ATM  ,Internet
3) Display Devices :Hi-Rsolution monitors,CD-quality speakers,Colour printers,HDTV,SVGA,etc.
4) Capture devices : -Video Camera,Video Recorder ,Audio Microphone,Keyboards,Mice
5) Storage devices :- Hard disks,CD ROM,DVD,etc.

Major characteristics:-
Multimedia presentations may be viewed by person on stage, projected, transmitted, or played locally with a media player. A broadcast may be a live or recorded multimedia presentation. Broadcasts and recordings can be either analog or digital electronic media technology. Digital online multimedia may be downloaded or streamed. Streaming multimedia may be live or on-demand.

Multimedia games and simulations may be used in a physical environment with special effects, with multiple users in an on-line network, or locally with an offline computer, game system, or simulator.

The various formats of technological or digital multimedia may be intended to enhance the users' experience, for example to make it easier and faster to convey information. Or in entertainment or art, to transcend everyday experience.

Application:-Multimedia finds its application in various areas including, but not limited to, advertisements, art, education, entertainment, engineering, medicine, mathematics, business, scientific research and spatial temporal applications. 

Monday, November 17, 2014

SSD

SSD  :-
  • A solid-state driveis a data storage device using integrated circuit assemblies as memory to store data persistently.
  • SSD technology uses electronic interfaces compatible with traditional block input/output (I/O) hard disk drives, thus permitting simple replacement in common applications.
  • SSDs have no moving (mechanical) components. This distinguishes them from traditional electromechanical magnetic disks such as hard disk drives (HDDs) or floppy disks, which contain spinning disks and movable read/write heads.
  • SSDs are still roughly seven to eight times more expensive per unit of storage than HDDs.
  • SSDs use NAND-based flash memory, which retains data without power.
  • SSD includes a controller that incorporates the electronics that bridge the NAND memory components to the host computer.
  • SSDs have no moving parts and therefore are basically silent, although electric noise from the circuits may occur.
  • Susceptibility to environmental factors-No moving parts, very resistant to shock and vibration.
  • Storage capacity-In 2013, SSDs were available in sizes up to 2 TB, but less costly 128 to 512 GB drives were more common.
  • Power consumption-High performance flash-based SSDs generally require half to a third of the power of HDDs. High-performance DRAM SSDs generally require as much power as HDDs, and must be connected to power even when the rest of the system is shut down.
  •  SSDs were mainly used in those aspects of mission critical applications where the speed of the storage system needed to be as high as possible. Since flash memory has become a common component of SSDs, the falling prices and increased densities have made it more cost-effective for many other applications. 
  • Advantage :-Speed: This is where SSDs shine. An SSD-equipped PC will boot in seconds, certainly under a minute. A hard drive requires time to speed up to operating specs, and will continue to be slower than an SSD during normal operation. A PC or Mac with an SSD boots faster, launches apps faster, and has higher overall performance. 
  • SSD technology has been developing rapidly.
  • Typically the same file systems used on hard disk drives can also be used on solid state disks.
  • While not a file system feature, operating systems must also align partitions correctly to avoid excessive read-modify-write cycles.
  • A typical practice for personal computers is to have each partition aligned to start at a 1 MB mark, which covers all common SSD page and block size scenarios, as it is divisible by 1 MB, 512 KB, 128 KB, 4 KB and 512 bytes. Modern operating system installation software and disk tools handle this automatically.
  • Other features designed for hard disk drives, most notably defragmentation, are disabled in SSD installations 
  • HDDs win on price, capacity, and availability. SSDs work best if speed, ruggedness, form factor, noise, or fragmentation (technically part of speed) are important factors to you. If it weren't for the price and capacity issues, SSDs would be the winner hands down.
  • Last but not least, an SSD and an HDD can be combined (like Voltron) on systems with technologies like Intel's Smart Response Technology. SRT uses the SSD invisibly to help the system boot faster and launch apps faster.

Sunday, November 2, 2014

Notes on php

The limitations of cookies :-
1) the cokkie specification says that 
I) no cookie can exceed 4KB in size,
II) only 20 cookies are allowed per domain ,
III) and a total of 300 cookies can be stored on the client side
2) There is no control over when the browsers actually expire cookies.

Type juggling :-
1) The conversion of a value from one type to another is called casting.
2) This kind of implicit casting is called type juggling in PHP.

Regular expressions:-
1) Definition :- A regular expression is a string that represents a pattern .The regular expression functions compare that pattern to another string and see if any of the string matches the pattern .Some functions tell you whether there was a match, while others make changes to the string.
2) PHP provides support for two different types of regular expressions :
1) POSIX and 
2) Perl- compatible
3) POSIX regular expressions are less powerful and sometimes slower , than the Perl - compatible functions ,but can be easier to read.
4)There are three uses for regular expressions:
1) matching ,which can also be used to extract information from a string ;
2) substituting new text for matching text; and
3) spilitting a string into an array of smaller chunks.
5) PHP has functions for all three behaviours for both Perl and POSIX regular expressions .For instance ,erg() does a POSIX match ,while preg_match() does a Perl match .
6) Fortunately ,there are a number of similarities between basic POIX and Perl regular expressions, so we'll cover those before dealing into the details of each library. 

Serialzation:-
1) Serializing an object means converting it to bytestream representation that can be stored in a file. This  is useful for persistent data , for example , PHP sessions automatically save and restore object.
2) Serialization in PHP is mostly automatic - it requires little extra work from you.

Design pattern


Why design pattern?
To make project new libraries are created.
New classes can be used for further program i.e. Classes are reusable.
Thus the problem which is reusable is design pattern.


Definition Design Pattern
Each pattern describes a problem which occurs over and over again in our environment and then describes the code of the solution to that problem in such a way that you can use this solution a million times over without ever doing it the same way twice.

Elements of design pattern :-
1) Pattern name
2) Problem
3) Solution
4) Consequences

The person requires documentation for design pattern i.e. Describing design pattern.
For this there are as follows:-
1) Pattern name and classification
2) Intent
3) Also known as ( different names for them e.g. Abstract class has user class name )
4) Motivation ( why person problem to motivate for design pattern )
5) Applicability ( Real life situations where used )
6) Structure ( data structures )
7) Participants ( objects and components )
8 ) Collaboration (collaborate)
9) Consequences ( Advantage and disadvantages) also drawbacks
10) Implementation
11) Sample code( code of any object oriented language )
12) Known Uses
13) Related Patterns .( relationship with other design pattern)
14) Factory methods ( only methods used for design pattern)

The catalog of design pattern :-
1) Abstract factory
2) Prototype
3) Singleton ( means single object )
4) Adaptor
5) Decorator
6) Proxy
7) Command
8) Observer
9) Strategy

Saturday, November 1, 2014

LAN wire configuration

Cat 5 is required for basic 10/100 functionality, you will want Cat 5e for gigabit (1000BaseT) operation.
The ethernet cable, are 8 color coded wires.
These wires are twisted into 4 pairs of wires, each pair has a common color theme.
One wire in the pair being a solid or primarily solid colored wire and the other being a primarily white wire with a colored stripe (Sometimes ethernet cables won't have any color on the striped wire, the only way to tell which is which is to check which wire it is twisted around).
Examples of the naming schemes used are: Orange (alternatively Orange/White) for the solid colored wire and White/Orange for the striped cable. The twists are extremely important.

RJ45 :-
RJ-45 conductor data cable contains 4 pairs of wires each consists of a solid colored wire and a strip of the same color. There are two wiring standards for RJ-45 wiring: T-568A and T-568B. Although there are 4 pairs of wires, 10BaseT/100BaseT Ethernet uses only 2 pairs: Orange and Green. The other two colors (blue and brown) may be used for a second Ethernet line or for phone connections. The two wiring standards are used to create a cross-over cable (T-568A on one end, and T-568B on the other end), or a straight-through cable (T-568B or T-568A on both ends).
What is RJ stands for?
RJ stands for Registered Jacks. These are used in telephone and data jack wiring registered with FCC. RJ-11 is a 6-position, 4-conductor jack used in telephone wiring, and RJ-45 is a 8-position, 8-conductor jack used in 10BaseT and 100BaseT ethernet wiring.

Monday, October 27, 2014

Data Mining


Data mining is the computational process of discovering patterns in large data sets involving methods at the intersection of artificial intelligence,machine learning, statistics, and database systems.
It is sometimes called Knowledge Discovery in Databases (KDD) .

The Knowledge Discovery in Databases (KDD) process is commonly defined with the stages:

    (1) Selection
    (2) Pre-processing
    (3) Transformation
    (4) Data Mining
    (5) Interpretation/Evaluation


Data mining involves six common classes of tasks:

1)Anomaly detection (Outlier/change/deviation detection) – The identification of unusual data records, that might be interesting or data errors that require further investigation.

2)Association rule learning (Dependency modeling) – Searches for relationships between variables. For example a supermarket might gather data on customer purchasing habits. Using association rule learning, the supermarket can determine which products are frequently bought together and use this information for marketing purposes. This is sometimes referred to as market basket analysis.

3)Clustering – is the task of discovering groups and structures in the data that are in some way or another "similar", without using known structures in the data.

4)Classification – is the task of generalizing known structure to apply to new data. For example, an e-mail program might attempt to classify an e-mail as "legitimate" or as "spam".

5)Regression – attempts to find a function which models the data with the least error.
 
6)Summarization – providing a more compact representation of the data set, including visualization and report generation.

In business, data mining is the analysis of historical business activities, stored as static data in data warehouse databases. The goal is to reveal hidden patterns and trends.

In recent years, data mining has been used widely in the areas of science and engineering, such as bioinformatics, genetics, medicine, education and electrical power engineering.

Data mining of government records – particularly records of the justice system (i.e., courts, prisons) – enables the discovery of systemic human rights violations in connection to generation and publication of invalid or fraudulent legal records by various government agencies.

Saturday, October 25, 2014

Solved quetions



 vijaymarwaha.blogspot.com

1.Find the wrong number in the sequence: 52, 51, 48, 43, 34, 27, 16
(A) 27
(B) 34
(C) 43
(D) 48

Answer:- (B) 34



2.In a certain code ,PAN is written as 31 and PAR as 35,then PAT is written in the same code as
(A) 30
(B) 37
(C) 39
(D) 41

Answer :- (B) 37



3.The letters in the first set have certain relationship. On the basis of this relationship,make the right choice for the second set :AF:IK: :LQ:?
(A )MO
(B) NP
(C) OR
(D) TV

Answer :-(D) TV



4.If 5472=9, 6342=6, 7584=6,what is 9236?
(A) 2
(B) 3
(C) 4
(D) 5

Answer :- (A) 2



5.1 GB is equal to
(A) 2 30 bits
(B) 2 30 bytes
(C) 2 20 bits
(D) 2 20 bytes

Answer :- (B) 2 30 bytes



6.The set of computer programs that manage the hardware/software of a computer is called
(A) Compiler system
(B) Operation system
(C) Operating system
(D) None of these

Answer :- (C) Operating system



7.S/MIME in Internet technology stands for
(A) Secure Multipurpose Internet Mail Extension
(B) Secure Multimedia Internet Mail Extension
(C) Simple Multipurpose Internet Mail Extension
(D) Simple Multimedia Internet Mail Extension

Answer :- (A) Secure Multipurpose Internet Mail Extension



8.Which one of the following is not an Internet Service Provider(ISP)?
(A) MTNL
(B) BSNL
(C) ERNET India
(D) Infotech IndiaLtd.

Answer :- (D) Infotech IndiaLtd.



9.The hexadecimal number system consists of the symbols
(A) 0 – 7
(B) 0 – 9 ,A–F
(C) 0– 7,A-F
(D) None of these

Answer :- (B) 0 – 9 ,A–F



10.The binary equivalent of (–15)10 is (2’s complement system is used)
(A) 11110001
(B) 11110000
(C) 10001111
(D) None of these

Answer :- (A) 11110001

Friday, September 12, 2014

Tablet

Today's tablet computers sport touch screens ranging in size from 7- up to 13-inches. These dimensions are by no means static, and boundaries can be blurred as smartphones get larger displays


Features of tablet :-
I) Hardware :-
1. High-definition, anti-glare display
2. Wireless local area and internet connectivity (usually with Wi-Fi standard and optional mobile broadband)
3. Front- and/or back- facing camera(s) for photographs and video
4. Lower weight and longer battery life than a comparably-sized laptop
5. Bluetooth for connecting peripherals and communicating with local devices
6. Early devices had IR support and could work as a TV remote controller.
7. Docking station: Keyboard and USB port(s)

Note:-
Special hardware: The tablets can be equipped with special hardware to provide functionality, such as camera, GPS and local data storage.

II) Software :-
1. Mobile web browser
2. Reader for digital books, periodicals and other content
3. Downloadable apps such as games, education and utilities
4. Portable media player function including video playback
5.  Email and social media
6. Mobile phone functions (messaging, speakerphone, address book)
7. Video-teleconferencing

III) Data storage :-
1. On-board flash memory
2. Ports for removable storage
3. Various cloud storage services for backup and syncing data across devices
4. Local storage on a LAN

IV) Additional inputs :-
Besides a touchscreen and keyboard, some tablets can also use these input methods:
1. Proximity sensor to detect if the device is close to something, in particular, to your ear, and can block unintended touches
2. Accelerometer: Detects the physical movement and orientation of the tablet. This allows the touchscreen display to shift to either portrait or landscape mode. In addition, tilting the tablet may be used as an input (for instance to steer in a driving game)
3. Ambient light and proximity sensors, which help distinguish between intentional and unintentional touches
4. Speech recognition
5. Gesture recognition
6. Character recognition to allow you to write text on the tablet, that can be stored as any other text in the intended storage, instead of using a keyboard.


To run your tablet smoothly:
1. Remove unnecessary apps and make more room.
2. Disable flashy settings that don’t really serve any important purpose.
3. Keep your screen clean (literally and virtually).
4. Format your external storage on a regular basis.

To install OS on your Tablet you need Android OS file that are compatible with your tablet and Software tools:
Memory card has to be made bootable. For this the PhoenixCard tool is needed.
First format the memory card, then select the  compatible Android ISO file. Please note that different tablet need different ISO files.

Thursday, September 11, 2014

iPad

The iPad is not a replacement for a laptop. Tablets are good at many things, but their abilities are a subset of a laptop's. You can't, for example, burn a music CD to listen to in the car, or a DVD of your latest home movie. It isn't particularly easy to print from an iPad, either, although it is possible in some apps (you can print an email, a document or a web page if you have a compatible printer).
Features of iPad or Advantages of iPad: 
1)Battery life:
With an iPad, you'll be freed from the mains all day, since it will last for at least eight (if not 10 or 12) hours of constant use.
2)Portability and comfort:

It's more comfortable to sit and use an iPad, it doesn't get too warm and there are no fans, unlike most laptops whose high-pitched fans can drive you to distraction.
3)Touchscreen interface :
You can type very fast on the iPad's virtual, on-screen keyboard.The iPad's interface is, in general, hugely intuitive.
4)Instant on and connected standby:
An iPad doesn't take minutes to boot up: it's ready to go instantly, so it's quick to check email and Facebook, or the weather forecast or TV listings.

iPad

Disadvantages of iPad: 
1) Storage:
The iPad has no way of adding storage, so you're effectively stuck with the capacity you buy.
2)File formats:
 The iPad is much more restrictive and requires videos, for example, to be in MP4 (H.264) format before they'll play. It means you might have to convert files before you can play them, which could be more hassle than you're willing to accept.
For photos and music, the iPad supports the common JPG and MP3 formats, so these aren't a problem for most people.
Education and healthcare
The iPad has several uses in the classroom, and has been praised as a valuable tool for homeschooling.Soon after the iPad was released, it was reported that 81% of the top book apps were for children. The iPad has also been called a revolutionary tool to help children with autism learn how to communicate and socialize more easily.
In the healthcare field, iPads and iPhones have been used to help hospitals manage their supply chain. For example, Novation, a healthcare contracting services company, developed VHA PriceLynx (based on the mobile application platform of business intelligence software vendor MicroStrategy), a business intelligence app to help health care organizations manage its purchasing procedures more efficiently and save money for hospitals. Guillermo Ramas of Novation states, "Doctors won't walk around a hospital with a laptop. With an iPad it's perfect to walk around the hospital with as long as they have the information they need."
In 2013, Gianna Chien (aged 14) presented to more than 8,000 doctors at the Heart Rhythm Society meeting that Apple iPad 2 can, in some cases, interfere with life-saving heart devices (pace maker) because of the magnets inside. Apple's webpage has advised pacemaker users to keep iPads at least 6-inches away from the pacemaker.

iBooks
The iPad has an optional iBooks application that can be downloaded from the App Store, which displays books and other ePub-format content downloaded from the iBookstore.

Internet connectivity in iPad:
The iPad can use Wi-Fi network trilateration from Skyhook Wireless to provide location information to applications such as Google Maps. The 3G model supports A-GPS to allow its position to be calculated with GPS or relative to nearby cellphone towers; it also has a black strip on the back to aid 3G reception. The iPad has a headphone jack and a proprietary Apple dock connector, but no Ethernet or USB port. However, the Apple Camera Connection Kit accessory provides two dock connector adapters for importing photos and videos via USB and SD memory cards.

Global warming and green house effect

 The heating up of the earth surface due to trapping of infrared radiations reflected by earth's surface by CO2 layer in the atmosphere is called green house effect.

Some major green house gases and their sources:


GasSources
Carbon Dioxide
(CO2)
1)Fossil fuel combination (coal,oil,natural gas)
2) Deforestation and land use changes
Methane
(CH4)
1) Enteric fermentation in cattle and insects.
2) Biomass burning and garbage land fills
3) Leakage of gases from coal mines and natural gas.
4) Rice paddies
5) Swamps and tundra
Chloro fluoro carbon
(CFC'S)
1) Plastic foams
2) Refrigeration and air-conditioning
3) Aerosols (spray propellants) CFC'
4) Industrial solvents
Nitrous oxide
(N2O)
1) Fertilizer use
2) Fossil fuel combustion
3) Biomass burning
4) Changing land use

Global warming and green house effect

An increase in average temperature  of the earth's atmosphere due to green house effect which can have effects on climate and key life, support system of planet.
An increase in global temperature is also likely to increase the incidences of infections diseases like malaria, dengue, sleeping sickness and yellow fever.

Computer model predicts that during next 50 years the average temperature rise from 1.5 0 C to 3.5 0C.
Such a change ,which is very rapid by natural standards ,could have far reaching effects , especially at extreme levels .These could be in the form of
1) a rise in sea levels up-to 5 to 6 meters from the melting of ice cap and glaciers and the thermal expansions of sea water.
2) altered climate pattern altering ecosystems and
3) more extremes of weather .

Wednesday, September 10, 2014

Logarithm


LogarithmDefinition Logarithm :
If m= a x, where a>0 ,a not equal to 1 , m>0 then x is called the logarithm of m to the base a and is written as x = log a m, where m, a, x are real numbers.

Laws of logarithms:
1. Law of Product: log (A.B) =log A +log B
2. Law of Quotient : log(A/B) =log A - log B
3. Law of Exponent : log m n = n log m

Properties:
1)We have m = a x if and only if x = log a m.
2)Logarithms of negative numbers and zero are not defined.
3) a0 =1 Hence, 0 = log a 1
i.e. logarithm of 1 to any base is always zero.
4) a1 =a Hence , 1 = log a a
i.e. logarithm of any number to the same base is 1.
5) x = log a ax
6) If log a m = log a n then m = n
7)If a>1 and m>n then log a m > log a n and conversely.

Write logarithm form:
1) 5 3 = 125
Solution:
3 = log 5 125   (By definition of logarithm)

2) 8 3 =512
Solution:
3 = log 8 512   (By definition of logarithm)


Express in exponential form:
1) log 2 128 = 7
Solution: 128 = 2 (By definition of logarithm)

2) log 9 6561 =4
Solution: 6561 = 2 (By definition of logarithm)


Simplify : 
1) log 5 + 2 log 4
Solution:
=log 5 + log 42 (By Law of Exponent)
=log 5 + log 16
=log (5 . 16) (By law of Product)
=log 80

2) 2 log 7 - log 14
Solution:
=log 7 2 - log 14 (By Law of Exponent)
=log 49 - log 14
=log (49/14) (By law of Quotient)
=log (7/2)

3)log 3 + log 2 - 2 log 5
Solution:
=log 3 + log 2 - log 52 (By Law of Exponent)
=log 3 + log 2 - log 25
=log (3 . 2) - log 25 (By Law of Product)
=log 6 - log 25
=log (6/25) (By Law of Quotient)

4) 2 log 3 - 1/2 log 16 + log 12
Solution:
=log 3 2 - log 16 1/2 + log 12 (By Law of Exponent)
=log 9 - log4 + log 12
=log (9/4) + log 12 (By Law of Quotient)
=log (9/4 .12) (By Law of Product)
=log (9. 3)
=log 27


Prove that:
1) log 540 = 2 log 2 + 3 log 3 + log 5
Solution:
L.H.S = log (540)
=log (4 X 27 X 5)
=log ( 22 X 33 X 5)
=log 22 + log 33 + log 5 (By Law of Product)
=2 log 2 + 3 log 3 +log 5 (By Law of Exponent)
=R.H.S.
Hence, log 540 = 2 log 2 + 3 log 3 + log 5

OR

R.H.S =2 log 2 + 3 log 3 + log5
=log 2 2 + log 33 + log 5 (By Law of Exponent)
=log 4 + log 27 + log 5
=log (4 X 27 X 5) (By Law of Product)
=log 540
=L.H.S.
Hence, log 540 = 2 log 2 + 3 log 3 + log 5

2) log 360 = 3 log 2 + 2 log 3 + log 5
R.H.S =3 log 2 + 2 log 3 + log5
=log 2 3 + log 32 + log 5 (By Law of Exponent)
=log 8 + log 9 + log 5
=log (8 X 9 X 5) (By Law of Product)
=log 360
=L.H.S.
Hence, log 360 = 3 log 2 + 2 log 3 + log 5

OR

L.H.S = log (360)
=log (8 X 9 X 5)
=log ( 23 X 32 X 5)
=log 23 + log 32 + log 5 (By Law of Product)
=3 log 2 + 2 log 3 + log 5 (By Law of Exponent)
=R.H.S.
Hence, log 360 = 3 log 2 + 2 log 3 + log 5


Evaluate:
1) log 81/log 9
=log 92 / log 9
=2 log 9 / log 9   (By Law of Exponent)
=2

2)log 2 5 / log2 11 - log4 5 / log4 11
Solution :
We know ,Change of Base formula is log a m = log m /log a

=log 5/log 2/log 11/log 2 - log 5/log 4/ log 11 /log 4
=log 5 . log 2 / log 11 . log 2 - log 5 .log 4 / log 11 .log 4
=log 5 / log 11 - log5 / log 11
=0

Embedded systems


Difference between Static RAM Dynamic RAM.

Static RAM Dynamic RAM
1. SRAM1. DRAM
2. It retains it levels so no require refreshing2. It requires some refreshing.
3. Power consumption is more3. Power consumption is less.
4. Speed is fast.4. Speed is less.
5. Package density is low.5. Package density is high.
6. Size can't be increase.6. Size can increase.
7. More expensive.7. Less expensive.
8. Made up of 6 CMOS transistors(MOSFET).8. Made up of a MOSFET and a capacitor.



Difference between RISC and CISC processors/controllers.

RISCCISC
1. It stands for Reduced Instruction Set Computing.1. It stands for Complex Instruction Set Computing.
2. Lesser number of instructions.2. Greater number of Instructions
3. Instruction pipe-lining and increased execution speed.3. Generally no instruction pipe-lining feature.
4. Orthogonal instruction set.4. Non-Orthogonal instruction set.
5. Operations are performed on register only, the only memory operations are load and store.5. Operations are performed on register or memory depending on the instruction.
6. A large number of registers are available6. Limited number of general purpose register.
7. Programmer needs to write more code to execute a task since the instruction are simpler ones.7. Instructions are like macros in C language. A programmer can achieve the desired functionality with a single instruction.
8. Single, fixed length instructions.8. Variable length instructions
9. Less silicon usage and pin count.9. More silicon usage since more additional decoder logic as required.
10. With Harvard Architecture.10. Can be Harvard or Von- Neumann Architecture.



Difference between microprocessor and micro-controller.

MicroprocessorMicro-controller
1.A silicon chip representing a central processing unit (CPU), which is capable of performing arithmetic as well as logical operations according to a pre defined set of instructions.1.A micro-controller is a highly integrated chip that contains a CPU, scratchpad RAM, special and general purpose register arrays, on chip ROM / FLASH memory for program storage, timer and interrupt control units and dedicated  I/O ports.
2.It is a dependent unit .It requires the combination of other chips like timers, program and data memory chips, interrupt controllers, etc. for functioning.2.It is a self-contained unit and it doesn't require external interrupt controller , timer , UART , etc. for its functioning.
3.Most of the time general purpose in design and operation .3.Mostly application-oriented or domain - specific.
4. Doesn't, contain a built in I/O port.The I/O port functionality needs to be implemented with the help of external programmable peripheral interface chips like 8255.4.Most of the processor contain multiple built-in I/O ports which can be operated as a single 8 or 16 or 32 bit port or as individual port pins.
5.Targeted for high end market where performance is important.5.Targeted for embedded market where performance is not critical.
6.Limited power saving options compared to micro-controllers.6.Includes lot of power saving features.



Difference between Harvard Architecture and Von-Neumann Architecture.

Harvard ArchitectureVon-Neumann Architecture.
1.Separate buses for instruction and data fetching.1.Single shared bus for instruction and data fetching.
2.Easier to pipeline , so high performance can be achieved .2. Low performance compared to Harvard architecture
3.Comparatively high cost.3. Cheaper
4.No memory alignment problems.4. Allow self modifying codes.
5.Since data memory and program memory are stores physically in different locations, no chances for accidental corruption of program memory.5. Since data memory and program memory are stores physically in the same chip , chances for accidental corruption of program memory.



Sunday, August 31, 2014

Higher knowledge in education system

Education is a continuous process.In the new education system , more emphasis is put on the student and his learning abilities.The learning process has been given its due importance as compared to the teaching process.Hence, it is the aim of all the teaching aids like diagrams,charts,video clips,slides,etc. and methods to make the learning process simple,effective and enjoyable .In fact,rectification of all the queries  and difficulties of a student and motivating him to acquire higher and higher knowledge is the true aim of an education system.

Computers programs can also be developed to test a particular skill and knowledge of a student . Nowadays , some of the examinations are conducted on the computer itself and the results are declared within minutes. Hence the traditional evaluation methods can be replaced by automated evaluation methods.
Moreover,depending on the results of the evaluation,computers can also suggest the methods to improve the skill and knowledge of the student. We should not forget the fact that even some of the websites on the Internet conduct courses on various subjects.If required ,a student can also learn and obtain certificates or degrees on the Internet itself.



Taking into consideration all these facts, we come to the conclusion that the computer is becoming an integral part of our education system .Computers can be used as a valuable tool or resource in teaching and learning at all levels. All students must be encouraged to use computers for learning as well as solving of their problems.Expensive books,remote areas,over population,traditional and less effective teaching and learning aids and all other problems will be eliminated with the implementation of Computers Education in our education in our system.

Nowadays, Internet has become a valuable tool for education system. It is a great source of knowledge.Internet is useful for students as well as experts for obtaining the reference materials and related information on a variety  of subjects like history ,civics,commerce, science and technology , painting, music, entertainment , geography , mathematics , politics , etc. with help of various websites.Presentation is the most important factor of the learning process.For the  students of higher education , computer acts as a computational tool. It can be used to learn various languages.

Monday, August 25, 2014

Basic Programminng

The way we have different editions of a book ,a programming language also advances by each version .
BASIC also has many versions. John Kemeny and Thomas Kurtz originally developed it at Dartmouth College around the mid -1960 s.It soon became very popular because of its simplicity .Later ,others followed it and developed MS-BASIC,GWBASIC, BASICA and QBASIC.Initally ,Micrisoft Corporation developed MS-BASIC. Writing programs and getting results was a slow process  and to overcome this limitation ,Microsoft developed its faster version QBASIC .Full form of QBASIC is Quick Beginners All Purpose Symbolic Instruction Code.
It is simple and easily available.
QBASIC has an inbuilt editor .Editor helps in creating ,editing and storing text program files.We can create ,execute and debug a program without leaving QBASIC which speeds up our work.

How to start QBASIC :
It can be started as stated below :
1.By double clicking QBASIC icon on the desktop ,if it exists on the desktop .
2.Clicking on Start  -->Run and typing qbasic.exe along with its full path in the open text box thereafter confirming it by clicking on O.K.
Whichever way we start ,the welcome dialog box gets displayed first and which can be cleared by pressing the Esc key .Thereafter ,we can continue programming.

Rules of BASIC language :
1. Ther should be one satement per line .
2. If a statement does not fit in one line, we can continue it in the next line by inserting semicolon (;) at the end of the first line .
3. A statement should be completed in maximum two lines.
4. Each statement should be numbered .Normally we give number at the interval of 10 .First of all ,it is easy to write and secondly ,if need  arises ,we can insert a statement without changing the other line numbers.

Components of the BASIC language :
Our language comprises of sentences. A sentence is nothing but a combination of words ,and while combining these words ,we follow some rules and norms which we call grammar .Similarly ,any programming language has sentences like statements . These statements comprise of commands and expressions .We can combine commands and expressions to create a set of instructions (program ) which solves a particular program .Each programming language has its own rule for writing statements .Each statement should be written with proper order of command and expression ,which is termed as syntax .Each command has its own syntax.

Some BASIC commands:
1. REM
Syntax  :  <Line no>REM<text message>
Using the REM command ,we can write comments wherever required.

2. LET
Syntax  :  <Line no >LET<text message>
example:
LET A=20
LET SUM=A+B

3. INPUT
Syntax  : <Line no>INPUT<text message>
example:
INPUT "Enter name and age";Name$,AGE

4. PRINT
Syntax  : <Line no >PRINT<print item>separator<print item>......
To print more than 1 item ,we have to use separator like comma or a semicolon.
example :
50 PRINT X,Y,Z
60 PRINT "X=";X,"Y=";Y
70 PRINT
80 PRINT A;B;C

5. READ-DATA
Syntax : <line no>READ<variable 1,variable 2,....>
<line no>DATA<value 1,value 2,....>
example
40 READ name$,age
50 PRINT "Your name is";name$
60 PRINT "Your age is ";age
70 DATA "Vijay",40

6. GO TO
Syntax: <line no>GO TO<line no>
example :150 GO TO 50

7. IF...THEN...ELSE
Syntax: <line no>IF condition >THEN n

8. FOR.....NEXT:
Syntax: <line no> FOR<variable>=formvalue >TO <to value>STEP <value>
<statement to be repeated>


 <statement to be repeated>

<statement to be repeated>


NEXT <variable>

9.LOCATE
Syntax: <line no > LOCATE x,y

10 CLS
Syntax :CLS command clears the screen .Normally it is used to start the program .
Example: 10 CLS

11. END :This command is used to instruct the end of the program
example: 70 END



Program to find area of a circle :
10 CLS
20 REM Program to find Area of Circle.
30 INPUT "Enter Radius";R...
40 LET Area = 3.14 *R^2
50 PRINT "Area of Circle with radius "R;"is";Area
60 END

Program :FOR ...NEXT LOOP
10 CLS
20 REM Repeat Action
30 FOR I=1 TO 5
40 PRINT "I Love My India"
50 NEXT I
60 ENd
RUN  (For this Pres F5)
I Love My India
I Love My India
I Love My India
I Love My India
I Love My India

 Program to print the squares of first 50 odd numbers:
10 REM Program to print the squares of first 50 odd numbers
20 CLS
30 PRINT "Number","Square"
40 PRINT "-----------------"
50 FOR I=1 To 99 STEP 2
60 LET SQ=I^2
70 PRINT I,SQ
80 NEXT I
90 END

Output:
Number      Square
   1                  1
   3                  9
   5                  25
   7                  49
    .                  .
    .                  .
   97                 9409
   99                9801

Program to prepare a table of any number
5  CLS
10 REM Program to prepare table of any number
20 INPUT "Enter Any Number -",N
30 LET X=1
40 S=N*X
50 PRINT N;"X";X;"=";S
60 X=X+1
70 IF X<11 THEN GO TO 40 ELSE PRINT "OVER"
100 END
RUN ---------------(Press F5 key)
Enter Any Number -----------(Suppose we have entered  17)
We get output:
17x1=17
17x2=34
and so on
17x10=170
OVER

GRAPHICS IN BASIC
Program to draw a circle
10 CLS
20 REM Program to draw a circle
30 SCREEN 1
40 CIRCLE(70,85),25
50 END





Wednesday, August 13, 2014

MS-Excel



1)Specify any one type of charts available in spreadsheet.
 

Answer: 
Bar graph, Column graph, Pie chart, Line graph, etc.

2)Give any one built-in function of spread sheet.
 

Answer:
 SUM(range) : This function returns the sum of all the numbers
in the list of arguments.
Example: =SUM(A2:E2)



3)What are macros in ESS?
 

Answer:
 Macro is a small program that caries out pre-defined series of steps by giving a few
keyboard shortcuts.
Macro is like a batch file created in dos. It contains a series of commands.
When a macro is called and run, the instructions given in it are executed one by one.



4)Differentiate between MAX( ) and MIN( ) built-in functions in a spread sheet.
 

Answer: 
MAX(num 1, num 2,……) : Returns the largest value in a set of values.
Example: =MAX(15, 25, 8, 14) returns 25
MIN(num 1,num 2……) : Returns the lowest value in a set of values.
Example: =MIN(15, 25, 8, 14) returns 8



5)Explain briefly built in functions in spreadsheet.
 

Answer:
SUM(range) : this function returns the sum of all the numbers
in the list of arguments.
Example: =SUM(A2:E2)
ABS(number) : It returns absolute value of a number.
Example: =ABS(-35)=35
SQRT(number) : This function returns a positive square root.
Example: =SQRT(5) equals 2.1928.
AVERAGE(num 1, num 2……) : Returns the average of the set of numbers.
Example: =AVERAGE(15, 25, 50) returns 30.




6)Explain Arithmetic functions of MS-Excel.
 

Answer:
SUM(range) : this function returns the sum of all the numbers
in the list of arguments.
Example: =SUM(A2:E2)
ABS(number) : It returns absolute value of a number.
Example: =ABS(-35)=35
SQRT(number) : This function returns a positive square root.
Example: =SQRT(5) equals 2.1928.
PRODUCT(num1, num2…) : It returns the product of all the
numbers given as arguments.
Example: =PRODUCT(5,8,2)=80





7)Explain DATE functions used in spreadsheets.
 

Answer: 
DAY(serial number) : It returns the day of the days corresponding to serial number or
date.
Example: DAY (“5-jan”)=5
MONTH(serial number) : It returns the month corresponding to serial number or date.
Example: MONTH(“6-may”)=5
NOW( ) : This function returns the serial number of the current date and time.
DATE(year, month, day) : Returns the serial number of a particular date.
Example: DATE: (2005,3,23) returns 38434.




8)Briefly explain advantages of spreadsheet.
 

Answer:
i. Built-in Functions: It has rich set of built-in functions to perform all types of
calculations such as sum, max, abs, product, etc.,
ii. Copying formula: Similar formula can be copied into any number of cells.
iii. Fill series: It is used to fill automatically fill numbers or data in a series of cells.
iv. Sorting: The data can be arranged in a specific order in a table.



9)Explain Logical functions in Ms-Excel.

Answer:
1. AND(logical1, logical2………) : This function returns TRUE if all its
arguments are true, returns FALSE if one or more arguments are FALSE.
Example: =AND(3<5, 8=8) returns TRUE
=AND(3>5, 8=8) returns FALSE
2. OR(logical, logical 2………) : It returns TRUE if one or more arguments are
TRUE, returns FALSE if all its arguments are FALSE.
Example: =OR(3<5, 8<>8) returns TRUE
=OR(3>5, 8<>8) returns FALSE
3. NOT(logical) : Reverses the value of its arguments.
Example: =NOT(3<5) returns FALSE
=NOT(3>5) returns TRUE
4. If(logical-test, value1, value2) : It returns value1 if logical test is true. If logical test is
false it returns value2.
Example: =If(85>80, “Dist”, “I Class”) returns “Dist”
=If(40>50, 100, 200) returns 200





Sunday, August 3, 2014

MOTHERBOARD

What is motherboard ? 
Or
Short Note on motherboard.

Answer:-

1)Motherboard specifically refers to a printed circuit board(PCB) with expansion capability and as the name suggests, this board is the "mother" of all components attached to it, which often include sound cards, video cards, network cards, hard drives, or other forms of persistent storage; TV tuner cards, cards providing extra USB or FireWire slots and a variety of other custom components .

2)It is the main circuit board in a computer.

3)A motherboard provides a way for hardware in a computer to communicate with each other.

4)The term mainboard is applied to devices with a single board and no additional expansions or capability, such as controlling boards in televisions, washing machines and other embedded systems.

5)An important component of a motherboard is the microprocessor's supporting chipset, which provides the supporting interfaces between the CPU and the various buses and external components. This chipset determines, to an extent, the features and capabilities of the motherboard.

6)It holds many of the crucial electronic components of the system, such as the central processing unit (CPU) and memory, and provides connectors for other peripherals.

7)Motherboards contain some non-volatile memory to initialize the system and load some start up software, usually an operating system, from some external peripheral device.






                                                           Figure :- Motherboard

Saturday, August 2, 2014

Solve sums of arithmetic



1. Find the smallest number which when diminished by 3,is exactly divisible by 21,28,36 and 45.

  Answer:-   1263  


2.If we multiply a fraction by itself and divide the product by its reciprocal , we get 1826/27. Find the original fraction.

Answer :-   2  2   
                       3



3. By what least number must 21,600 be multiplied to make it a perfect cube?

Answer :-  10


4.Solve
  0.5 * 0.05 * 0.005 * 50

Answer:-  0.006250


5. The value of a machine depreciates at the rate 10% every year. It was purchased 3 years ago.If its present value is Rs 8,748 , find its purchase price.

Answer :-  Rs 12,000



6. On a journey across Delhi , a taxi averages 30 kmph for 60% of the distance,20kmph for 20% of it and 10 kmph for the remainder. Find the average speed for the whole journey.

Answer:-  20 km per hr


7. A mixture contains alcohol and water in the ratio of 4:3 .If  7 litres of water is added to the mixture, the ratio of alcohol and water becomes 3:4 . Find the quantity of alcohol in the mixture.

Answer:-  12 litres


8. A and B can do a piece of work in 12 days, B and C in 15 days,C and A in 20 days.In how many days A alone will do the work?

Answer:-  30 days


9. At a certain rate of simple interest, a certain sum doubles itself on 10 years,it will treble itself?

Answer:-  20 years



10. If the ratio of the areas of two squares is 9:1 ,then what will be the ratio of their parameters?

Answer:-  3:1


11. If a commission of 10% is given on the written price of an article ,the gain is 20 % .Find the gain percent if the commission is increased to 20 %.

Answer:-  6  2 %
                     3



Wednesday, July 30, 2014

Question and answer




1. Name the components of CPU
Answer:
a) ALU    b) PC   c) Accumulator   d) MAR   e) IR    f) ID   g) MDR



2. What is the use of registers in CPU?
Answer:
It is used to store intermediate data and instructions.



3. What is the function of MAR?
Answer:
It specifies the address of memory location from which data or instruction is to be accessed or to which the data is to be stored.



4. What is the function of MDR / MBR?
Answer:
It contains the data to be written into or read from memory location addressed by MAR.



5. What is program counter?
Answer:
It keeps track of the memory address of the instruction that is to be executed next.


6. What is the function of IR?
Answer:
It contains the instruction that is being executed.


7. What is the purpose of Instruction Decoder?
Answer:
It decodes the instructions.


8. What is a data bus?
Answer:
It carries a word to or from memory.


9. What is an address bus?
Answer:
It carries memory address. The width of address bus equals the number of bits in the MAR.


10. What is the function of control bus?
Answer:
It carries signals between the units of the computer.


11. Name different I/O ports.
Answer:
Port is a socket on the back of computer. Different types of ports are serial ports, parallel ports and USB ports.


12. What is meant by plug and play cards?
Answer:
It enables the user to add devices to computer.


13. Expand SD RAM.
Answer:
Synchronous Dynamic Random Access Memory.


14. Expand DDR RAM.
Answer:
Double Data Rate Random Access Memory.


15. Write a note on components of motherboard.
Answer:
1) Bus : -
a. Address Bus
b. Data Bus
c. Control Bus
2) Expansion slots: They serve the purpose of adding functionality to the computer.
a. ISA : Industrial standard architecture.
b. PCI : Peripheral component interface
c. AGP : Accelerated Graphic port.
3) CACHE Memory: It is a small fast memory that resides between CPU and main memory.
4) CMOS : Complementary Metal Oxide Semiconductor Battery
5) I-O Ports ( Input –Output Ports ): Serial , Parallel , USB etc.


16. Explain the different factors affecting the processing speed of CPU.
Answer:-
CPU Speed/Clock speed: Speed of CPU also known as clock speed. The clock speed is the
number of instructions executed by the CPU in one second It is measured in megahertz(million
instructions per second). The average speed of a new CPU is about 1000MHz to 4000 MHz.(1 to 4 gigahertz).
Instruction set: The number of instructions decide the efficiency of a CPU. More the instructions, less efficient is the CPU and less the instructions, More efficient is the CPU.
Word size/Register size: The size of registers determines the amount of data the computer can work with at a time. Normally it is 32 bits. Smaller the size of register, slower will be the computer. . It is also known as Word size. It varies from 16 bits to 128 bits.
Data bus capacity: Width of a data bus determines the largest number of bits that can be transported at one time.
Cache Memory size: Cache memory is a high speed memory. Greater the cache, faster a processor runs. Most modern processors can execute multiple instructions per clock cycle which speeds up a program. Some CPU’s have storage for instructions and data built inside the processor chip . This is called internal cache or L1 cache memory.
Memory Size: The amount of PRIMARY STORAGE (RAM) determines the size of program that can be kept in primary storage, which is faster than secondary storage. There by the speed of computer increases. The size of RAM varies from 64 MB to 4 GB.


17. Explain USB Port (Universal Serial Bus).
Answer:
a. It is a high speed serial bus
b. It is a plug and play interface between computers and add on devices.


18. Give the specifications of Laser printer.
Answer:
a. Resolution varies from 600 to 1200 dots per inch.
b. Speed varies from 4 PPM to 24 PPM.
c. Buffer size varies from 4MB to 32 MB
d. Can print color images.


19. Give the specifications of dot matrix printer.
Answer:
a. Print head normally has 9 pins to 24 pins.
b. Speed varies from 30 to 300 characters per second.
c. Buffer size varies from 1K to 64 K.


20. Give the specifications of inkjet printer.
Answer:
a. Resolution is around 300 dots per inch.
b. Speed varies from 1PPM to 12 PPM
c. Buffer size varies from 1 MB to 4 MB.


21. Write a note on computer maintenance.
Answer:
a. Avoid heat dust and noise
b. Periodic updates and enhancements
c. Installing fire walls and anti virus.
d. In house software maintenance
e. Computer periodic checkup.


22. What are the possible threats to a computer system and how to provide security?
Answer:
Threats
a. Privacy
b. Integrity
c. Environmental damage
d. Human threats
e. Software threats
f. Unauthorized access
g. Computer viruses
Security
a. Physical protection of machine and media.
b. Giving passwords and users ID
c. Using Licensed software
d. Use of Cryptography
e. Use of Spike busters and UPS


23. Explain the typical causes of computer failures.
Answer:
a. Break down of components.
b. Excessive dust or humidity
c. Virus
d. Voltage fluctuation
e. Corrosion


24.Write a note on Computer virus.
Answer:
Viruses are collection of coded instructions which are self replicating. When a virus attaches itself to another file it infects it. They are normally inactive until infected program is run.
They are broadly classified into three categories.
a. Boot infectors
b. System infectors
c. Executable program infectors
a.Boot infectors: Create bad sectors. They remain in the memory until the system is shutdown.
b.System infectors: It infects the hard disk or boot-able floppies which may contain system files.
c.Executable program infectors: These are dangerous and devastating. They spread to almost any executable program attaching themselves to programming files.


25. Explain the General Structure of CPU.
Answer:
Program counter: This register stores address of next instruction to be executed.
Memory address register (MAR): This register specifies address in memory where information can be found. This register is also used to point to a memory locations where information can be stored.
Memory buffer register: This register acts as an interface between CPU and memory. When CPU issues a Read Memory command, instruction is fetched and placed in MB register.
Instruction register:This stores a copy of current instruction.
Instruction decoder (ID): ID is an electronic hardware, which decodes instructions. The instructions are further broken down into a set of micro operations, so that they can be executed directly.
General purpose registers: They are used to store data. There are 6 GP registers. These are used for storage of data as needed by the program.
Arithmetic Logic Unit: The basic arithmetic operations such as addition, subtraction, multiplication and division are carried out here. These operations need at least two operands, one which is stored in accumulator and the other in the MBR. After the manipulation of data in ALU, the result is transferred to accumulator.
Accumulator: During processing the intermediate data needed for future processing is stored in
accumulator. The contents of ACC are used by ALU for operations and later by MBR holds the final result for further action.


26. Explain the cache memory in detail.
Answer: 
Cache memory is a small and fast memory between CPU and main memory. It is extremely fast compared to normal memory. Transferring data between main memory and CPU causes delay because RAM is slower than CPU. Cache memory stores copies of data from most frequently used main memory locations. When processor needs to read from or write to a location in main memory, it first checks whether a copy of data is in the cache. If so processor immediately reads or writes to cache. Computers use multilevel of cache such as Level1(smallest)and Level2 cache.CPU resident cache is known as L1 or primary cache (16 to 32 KB) to 512 KB.Cache is also added to mother board also known as L2 cache (512 KB to 1024 KB). Higher end systems can have as much as 2 MB of L2 cache on mother board.



Monday, July 28, 2014

Functions based Qs and answer in C programming

1. What is a function?
Answer:-
A function is a small segment of the program(sub program) designed to perform a specific task and return a result to the main or calling program.


2. What are the different types of functions supported in “C” language?
Answer:-
C supports two types of functions. They are
1. Built-in / Library functions
2. User defined functions



3. What are library functions?
Answer:-
Some of the operations are programmed and stored in C library so that they can be called in the program. These functions are called as library functions.
Eg : printf(), sqrt(), pow()


4. What is a user defined function?
Answer:-
A user-defined function is a complete and independent program unit, which can be used(or invoked) by the main program or by other sub-programs.



5. Mention the need for a function
Answer:-
If there are a number of statements that are repeatedly needed in the same program at different locations,then a function may be used.




6. What do you mean by a calling function?
Answer:-
Once the function is created it can be called from the main program or from any other function. This main program or the function which calls another function is called calling function.




7. What is a called function?
Answer:-
The user-defined function which is called by the main program or from any other function is known as called function.




8. What does the return-type-specifier of a function identify?
Answer:-
It identifies the type of value, which will be sent back after the function has performed its task (eg: int, float).




9. Why is the return type void used?
Answer:-
The return type void is used if the function does not return any value to the calling function.




10. What is an argument?
Answer:-
Information or values are passed to the function through special identifiers are called arguments.




11. What are actual parameters?
Answer:-
The arguments (values) which are passed to the function when a function call is made are called actual parameters.



12. What are formal parameters?
Answer:-
The arguments which are used in the argument list of the function header to receive the values from the calling program are called formal parameters or dummy parameters.




13. Give the syntax of a function call?
Answer:-
A function call has the following syntax:
variable = function_name(arg1,arg2…);
where arg1, arg2… are the actual parameters.




14. How is a function invoked?
Answer:-
A function is invoked(or called) through an output statement or through an assignment statement by using the function name followed by the list of arguments.Example: p = prod(x, y);



15. What is the use of the return statement?
Answer:-
The return statement is used in the body of the function which contains the value that has to be sent back to the main program.




16. Give the syntax of return statement?
Answer:-
The return statement can take one of the following forms return; Or return(expression);The first form does not return any value, where the second function returns the value of the expression.




17. What are local variables?
Answer:-
Variables declared inside a block or function are said to belong only to that block and these are called as local variables. Values of these variables are valid only in that block.




18. What are global variables?
Answer:-
Variables declared before the main function block are called global variables. Values of these variables are available in every block of that program.




19. What is function prototype?
Answer:-
A function must be declared before it is actually called. The declaration of a function is known as function prototype.




20. Give the syntax of a function prototype.
Answer:-
return-type function-name (type1, type2);
Ex: float power(float, int);




21. Define the term recursion.
Answer:-
A function which calls itself directly or indirectly again and again until a condition is satisfied is called as recursive function. This process is called recursion.




22. How do we pass an entire array to a function?
Answer:-
To pass an entire array to a called function only the array name without a subscript is used as argument(actual parameter).
Ex: void main( )
{
int a[100], n;
. . . . . . . . . .
sort(a, n); (where sort is the function name)
}




23 What is meant by scope of a variable?
Answer:-
1. The name of the variable.
2. The amount of space required to store that variable.
3. Address of the memory location.
4. The possible operations, which can be performed with the variable.




24. What are storage classes?
Answer:-
A storage class refers to the scope and life time of a variable i.e., the portion of program where the variable is valid and how long a variable can retain its value is defined
in the storage class.




25. What are the different types of storage classes?
Answer:-
1. Automatic storage class
2. External storage class
3. Static storage class
4. Register storage class



26 does Register variable have address?
Answer:-
No. (CPU registers do not have addresses).




27. Give the differences between library functions and user-defined functions.

Answer:-
Library functions :-
i. Some of the operations are programmed and stored in C library so that they can be called in the program. These functions are called as library functions.
ii. Library functions are in-built functions.

User-defined functions :-
i. Large programs can be broken down into smaller sub programs or modules. These sub programs are called user-defined functions.
ii. User-defined functions are created by the user.




28. What is a function call? What is the syntax of a function call?
Answer:-
To execute a function we will have to call the function. A function call establishes a link between the called function and the calling program.
A function call has the following syntax:
variable = Function_name (arg1, arg2…);
where arg1, arg2… are the actual parameters.




29. Why is the return statement is required in a function body?
Answer:-
When a function is called control is transferred from the calling function (main program) to the called function (sub-program). The statements of the called function are executed and finally the called function is terminated and sends the required result back to the calling function. The return statement is used to send the result from the function to the main program, thus terminating the called function.
The syntax is: return;
Or
return(expression);
The first form does not return any value, where the second function returns the value of the expression.




30. What is a function prototype? When is a function prototype necessary?
Answer:-
The declaration of a function before it is used is called as function prototype. A function prototype contains the data type of arguments sent as input to the function and data type of the result sent back from the function
Syntax: data_type function_name(data_type1,data_type2,….);
Example: float power(float, int);




31. Explain user defined function with an example
Answer:-
User defined function is a subprogram that is called by a main() function or any other function.
A user defined function may appear before or after the main() function. The general syntax of function definition is as follows:
Return_type_ specifier Function_name (type arg1, type arg2….)
{
local variable declarations; argument list
statement1;
statement2;
… Body of the function
statement n;
return (expression);
}
Return data type- indicates the data type of variable sent back from called
function to calling function
Function name- indicates the name of the function .It is an identifier
Argument list- list of input variables and their data-types received from calling
function
Local variable declaration-list of data that required only for the function block in which they are declared.
Body of the function-It includes declaration part (local variables) and a set
of executable statements which will perform the required task.
Return statement- indicates termination of function and transfer of control from called
function to calling function
Example:
int sum(int a,int b)
{
int c;
c=a+b;
return(c);
}




32. Mention different types of functions.
Answer:-
The different types of functions are
1. functions with no input and no return value
2. functions with input and no return value
3. Functions with input and return value
4. Recursive functions




33. What are storage classes? Mention different types of storage classes. Explain
Answer:-
A storage class refers to the scope of data in a program. Scope of data means the portion of the program in which the variable is valid(mian() as well as sub
programs) and lifetime of the variable.i.e., the length of time to which the variable
retains its value.

A variable must belong to any one of the following storage classes.
1. Automatic storage class
2. External storage class
3. Register storage class
4. Static storage class

Automatic storage class :-
Automatic storage class is similar to local variable declaration
Key word auto precedes the declaration
Ex:
auto int x,y,z;
• Automatic variables are local variables
• The variables are stored in memory(RAM)
• The key word auto is implicit(it means even without the word auto the
variable is automatic)
• Initial value stored is junk

External storage class :-
External storage class is similar to global variables.
Keyword extern precedes the declaration
Ex:
Extern int m,n;
• Scope of the variable is global
• The variables are stored in memory
• Needs explicit(must use the keyword)declaration
• Initial value stored is junk

Register storage class :-
Register storage class is used when data is needed in cpu registers
Key word register must precede the declaration
Ex:
register int x,y;
• Scope of the variable is local
• The variables are stored in registers
• Needs explicit declaration
• Initial value is not known

Static storage class:-
Static storage class is used in function blocks. The static variable can be initialized exactly once when the function is called for the first time. For subsequent calls to the same function, the static variable stores the most recent value.
Key word static precedes the variable declaration
Ex: static int x,y,z;
• Scope of the variable is local
• The variables are stored in memory
• Needs explicit declaration
• Default Initial value is stored is 0.


शिव भोलेनाथ स्तुति

 जय शिवशंकर, जय गंगाधर, करुणा-कर करतार हरे,   जय कैलाशी, जय अविनाशी, सुखराशि, सुख-सार हरे जय शशि-शेखर, जय डमरू-धर जय-जय प्रेमागार हरे,   जय ...