Saturday 4 July 2015

Technical Interview Questions for Civil Engineering Students


Civil Engineering

What are the steps involved in the concreting process, explain?

The major steps involved in the process of concreting are as follows:
1. Batching
2. Mixing
3. Transporting and placing of concrete
4. Compacting.

>Batching: The process of measurement of the different materials for the making of concrete is known as batching. batching is usually done in two ways: volume batching and weight batching. In case of volume batching the measurement is done in the form of volume whereas in the case of weight batching it is done by the weight.

>Mixing: In order to create good concrete the mixing of the materials should be first done in dry condition and after it wet condition. The two general methods of mixing are: hand mixing and machine mixing.

>Transportation and placing of concrete: Once the concrete mixture is created it must be transported to its final location. The concrete is placed on form works and should always be dropped on its final location as closely as possible.

>Compaction of concrete: When concrete is placed it can have air bubbles entrapped in it which can lead to the reduction of the strength by 30%. In order to reduce the air bubbles the process of compaction is performed. Compaction is generally performed in two ways: by hand or by the use of vibrators.

Describe briefly the various methods of concrete curing.

Curing is the process of maintaining the moisture and temperature conditions for freshly deployed concrete. This is done for small duration of time to allow the hardening of concrete. The methods that are involved in saving the shrinkage of the concrete include:

(a) Spraying of water: on walls, and columns can be cured by sprinkling water. 

(b) Wet covering of surface: can be cured by using the surface with wet gunny bags or straw

(c) Ponding: the horizontal surfaces including the slab and floors can be cured by stagnating the water.

(d) Steam curing: of pre-fabricated concrete units steam can be cured by passing it over the units that are under closed chambers. It allows faster curing process and results in faster recovery. 

(e) Application of curing compounds: compounds having calcium chloride can be applied on curing surface. This keeps the surface wet for a very long time.

What do you understand by “preset” during the installation process of bridge bearings?

During the installation of bridge bearings the size of the upper plates is reduced to save the material costs. This process is known as preset. Generally the upper bearing plate comprises of the following components:

> Length of bearing
> 2 x irreversible movement.
> 2 x reversible movement.

The bearing initially is placed right in the middle point of the upper bearing plate. No directional effect of irreversible movement is considered. But since the irreversible movement usually takes place in one direction only the displaced direction is placed away from the midpoint. In such cases the length of the upper plate is equal to the length of the length of the bearing + irreversible movement + 2 x reversible movement.

Why are steel plates inserted inside bearings in elastomeric bearings?

In order to make an elastomeric bearing act/ function as a soft spring it should be made to allow it to bulge laterally and also the stiffness compression can be increased by simply increasing the limiting amount of the lateral bulging. In many cases in order to increase the compression stiffness of the bearing the usage of metal plates is made. Once steel plates are included in the bearings the freedom of the bulge is restricted dramatically, also the deflection of the bearing is reduced as compared to a bearing without the presence of steel plates. The tensile stresses of the bearings are induced into the steel plates. But the presence of the metal plates does not affect the shear stiffness of the bearings.

What reinforcements are used in the process of prestressing?

The major types of reinforcements used in prestressing are:

> Spalling Reinforcement: The spalling stresses leads to stress behind the loaded area of the anchor blocks. This results in the breaking off of the surface concrete. The most likely causes of such types of stresses are Poisson`s effects strain interoperability or by the stress trajectory shapes.

> Equilibrium reinforcements: These types of reinforcements are required where several anchorages exist where the prestressing loads are applied in a sequential manner.

> Bursting Reinforcements: These kinds of stresses occur in cases where the stress trajectories are concave towards the line of action of load. In order to reduce such stresses reinforcements in the form of bursting is required.

In the design of bridge arguments what considerations should be made to select the orientation of the wing walls?

Some of the most common arrangements of wing walls in cases of bridge arguments are as follows:

> Wing walls parallel to abutments: This method is considered to take least amount of time to build and is simple as well. But on the downside this method is not the most economical. The advantage of this type of design is that they cause the least amount of disturbance to the slope embankment.

> Wing walls at an angle to abutments: This design method is considered to be the most economical in terms of material cost.

> Wing walls perpendicular to abutments: The characteristic of this design is it provides an alignment continuous with the bridge decks lending a support to the parapets.

In case if concrete box girder bridges how is the number of cells determined?

When the depth of a box girder bridge exceeds 1/6th or 1/5th of the bridge width then the design recommended is that of a single cell box girder bridge. But in case the depth of the bridge is lower than 1/6th of the bridge width then a twin-cell or in some cases multiple cell is the preferred choice. One should also note that even in the cases of wider bridges where there depths are comparatively low the number of cells should be minimized. This is so as there is noticeably not much improvement in the transverse load distribution when the number of cells of the box girder is higher than three or more.

Under what circumstances should pot bearings be used instead of elastomeric bearings?

Pot bearings are preferred over elastomeric bearings in situations where there are chances of high vertical loads in combinations of very large angle of rotations. Elastomeric bearings always require a large bearing surface so that a compression is maintained between the contact surfaces in between the piers and the bearings. This is not possible to maintained in high load and rotation environment. Also the usage of elastomeric bearings leads to the uneven distribution of stress on the piers. This results in some highly induced stresses to be targeted at the piers henceforth damaging them. Due to the above reasons pot bearings are preferred over elastomeric bearings in such cases.

Why should pumping be not used in case of concreting works?

During the pumping operation the pump exerted pressure must overcome any friction between the pumping pipes and the concrete, also the weight of the concrete and the pressure head when the concrete is placed above the pumps. Since only water is pump able, all the pressure generated is by the water that is present in the concrete. The major problem due to pumping is segregation effects and bleeding. In order to rectify and reduce these effects, generally the proportion of the cement is increased in order to increase the cohesion, which leads to the reduction of segregation and bleeding. Also if a proper selection of the aggregate grading can vastly improve the concrete pump ability.

Why should curing not be done by ponding and polythene sheets?

The primary purpose of curing is to reduce the heat loss of concrete that is freshly placed to the atmosphere and in order to reduce the temperature gradient across the cross-section of the concrete. Ponding is not preferred for curing as this method of thermal curing is greatly affected by cold winds. In addition to that in ponding large amounts of water is used and has to be disposed off from the construction sites. Polythene sheets are used on the basis that it creates an airtight environment around the concrete surface henceforth reducing the chances of evaporation over fresh concrete surfaces. But the usage of polythene can be a drawback as it can be easily blown away by winds and also the water lost by self-desiccation cannot be replenished.

What are the different types of slump test indications?

Slump tests are performed to empirically measure the workability of fresh concrete. It is used to measure the consistency of the concrete. In general there are three different types of slumps that occur in slump tests. They are as follows:

> True Slump

> Shear Slump

> Collapse Slump

True Slump: This type of slump is characterized by the general drop of the concrete mass evenly without visible signs of deterioration or disintegration. 

Shear Slump: It indicates that the concrete mix is deficient in cohesion. This type of slump leads to segregation and bleeding. Henceforth in the long run effecting the durability of the concrete. 

Collapse Slump: This type of slump is indicates that the mix of concrete is simply too wet. The mix is considered to be harsh and lean.

Why is propping required for long structures once the formwork is removed?

Once the process of concreting is performed the striking of the formworks should be done as soon as possible as delay in this process can lead to the discoloration of the concrete structures. In case of long structures particularly long span structures once the structures have attained enough strength to support themselves it is essential to provide them with propping as creep deflection can take place which can greatly reduce the integrity of the structure. Due to the above mentioned reasons propping should be done after the removal of formwork. Also the props should not be made to stand long as it can lead to overstress for the structures.

Explain the mechanism of cavitations in pipes and drains?

The formation of air bubbles in a fluid due to low pressure conditions lower than the saturation pressure is known as cavitations. This is considered to be a high potential damage condition where the strength and durability of the pipes can be greatly reduced. Cavitation works on the principle of Bernoulli's Equation. When fluids are at high velocities the pressure head of fluids reduce accordingly. But since the fluid pressure is lower than the saturation pressure the dissolved gases get released from the flowing fluid. These air bubbles suddenly collapse on entering a region of high pressure. This leads to the damage of the pipelines as a high level of dynamic pressure is created.

For what purpose bedding is used under storm water drains, explain?

Beddings are primarily made up of granular or concrete materials. They are primarily used for the following purposes:

> They are used to provide a more uniform support for the under pipes so that the bending moment longitudinally can be reduced greatly. 

> In order to enable the pipes to get more load-supporting strength.

> They are also used to act as a platform to achieve a more correct alignment and level pre and post construction.

> In case of pipes which contain spigot and socket joints, it enables pipes to get supported along pipe lengths in place of sockets. Otherwise it can lead to uneven stress being induced on the pipes eventually damaging it.

Why are pull-out tests performed for soil nails?

Pull out tests are performed for primarily the following reasons:

> In order to detect and the verification of the bond strength among the soil and the grout adopted during the design of soil nails. This is considered to be as the primary objective of performing pull out tests for soil nails.

> For the detection of any slippage or occurrence of creeps.

> To detect the elastic and deformations (plastic) of any of the test nails employed. Observations are made during the loading and unloading cycles of the soil nails repetitively.

> To achieve the perfect balance the test nails should always be loaded so that the ultimate soil/grout mixture with an upper limit of 80%.

Describe briefly the advantages and disadvantages of using plastic and timber fenders?

The advantages and disadvantages of using plastic fenders are as follows:

·         Plastic fenders are low in strength with a relatively high resistance to abrasion.
·         Plastic fenders are resistant to chemical and biological attacks.
·         Plastic fenders have moderate energy absorption capacity.
·         The berthing reactions are also comparatively moderate and depend on the point of contact.
·         Also since they are made from recycled material they are environmental friendly.

The advantages and disadvantages of using timber fenders are:

·         Timber fenders are low in strength and are very susceptible to marine borer attacks and rotting.
·         The energy absorption capacity is very low.
·         Also generally the contact pressure between the vessels and the fender are high.

Explain why concrete barriers have curved surface profiles?

The concrete safety fencings are made to contain vehicles in their carriageway being travelled so as to reduce the chances of rebounding into the roads leading to more hazards. In the case of normal fencings upon vehicle crashes the fencings give away so as to absorb as much energy as possible henceforth reducing the impact on the vehicles. But in the case of concrete barriers their purpose is not to absorb energy of vehicles crashing into the barrier but to retain them. They have a curved design so as to allow the vehicles that hit them to slightly go up on the barrier but not overturn. They also prevent the vehicle from again getting back on the road by rebounds. This helps in vastly reducing the chances of other vehicle hazards.

Why is the use of granular sub-base in concrete carriageways not preferred, explain?

Some of the reasons why granular sub-base is not preferred in concrete carriageways:

> Sub bases are permeable and hence water can seep through them easily. The soil particles get pumped out through the joints on the application of traffic loads. This results in the creation of voids underneath the pavement structure. This leads to the weakening of the concrete surface and it can crack easily upon intense traffic loads.

> Instead if lean concrete is used for carriageways it greatly increases the strength of the roads and the load carrying capacity of the roads is increased.

> Sub-bases implementation requires a lot of workmanship which can lead to an un-uniform distribution of the sub-base. This can lead to the cracking of the carriageway when there is severe traffic loading.

Why are separation membranes used between concrete pavement slab and sub-base?

The purpose of separation membrane between the concrete pavement slab and the sub-base are as follows:

> The separation membrane reduces the frictional forces between the concrete slabs and the sub-base. The membrane aids the movement of the concrete slab in reference to the sub-base when changes in the level of the moisture and temperature occur.

> It aids in the segregation of sub-base materials from freshly placed concrete.

> The separation membrane also helps in the reduction of cement and water loss in the form of immature concrete. Immature concrete greatly affects the strength of the concrete. It also affects the durability of it. 
A good example of separation membranes is polythene sheeting which is commonly used.

In the roof of a pumping station explain briefly the components of a waterproofing system.

The components of a typical waterproofing system on the roof of a pumping station are as follows:

> Right above the structural finish level of the roof (concrete) a uniform thickness screed is applied so as to facilitate the application of the waterproofing membrane. The surface provide for the membrane should always possess good cohesion properties and must be thin so as to prevent any un-uniformity. This thin layer also acts as a layer of thermal insulation.

> Right above this layer the waterproofing membrane is deployed to secure the water tightness of the roof.

> In order to enhance the thermal insulation of the roof an insulation board is sometime placed right above the waterproof membrane. The insulation board helps in the maintenance of a stable temperature in both weathers.

During reclamation how the occurrences of mud waves can can be rectified?

There are several solutions to the rectification of the problem of mud waves:

> Complete removal of all the disturbed mud: This method can be considered to be one of the fastest methods. As soon as the disturbed mud is removed some filling material is used to replace the disturbed mud. But economically this method can be expensive as compared to others.

> Accelerated consolidation of disturbed mud: In this method surcharging loads are placed on top of the mud waves. Along with this band drains are installed to accelerate the consolidation process. This method is quite slow compared to the other methods.

> Partial removal of the disturbed mud: This method is the hybrid of the above two methods where the top layer is removed whereas the lower level is treated with the surcharging process.

In reclamation works what are the importance of geotextiles and sand?

The primary purposes of geotextiles and sand in reclamation works are as follows:

> Geotextiles: They are used to separate the marine mud from the reclamation fill. Also geotextiles are used as reinforcements in reclamation processes to increase its stability. It is still debated as to whether the usage of geotextiles is better or is the old processes followed are better as the performance has not been comparable to the conventional methods.

> Sand: In reclamation process sand is used to spread the load of any future public dumps placed on top of it. Sand also acts as drainage for the excess pore water pressure of band drain installations.

 In block work seawalls what is the purpose of slip joints?

Joints which are formed from the cope level to the toe level of seawalls through a complete vertical plane are known as slip joints. Such joints are designed so as to handle the differential settlements between the seawalls adjacent panels. In the slip joints the aggregates inside the half-round channels enables some vertical movements. These vertical movements are induced by differential settlements. This enables in the interlocking of the adjacent panels of the seawalls to link the panels in one unit against the earth pressure (lateral) which is exerted on the seawalls.

For a washout valve why are two gate valves required in normal practice?

The washout valves are primarily used for normal maintenance works such as that of water main. This can be like to allow water to flow out during the cleaning of the water main. The junction at whom a pipe branches out to a washout point usually a gate valve is installed so that the two pipelines are separated. The gate valve installed above usually remains open during normal operation. Another gate valve is installed further downstream and this remains closed during normal operation of the washout valve. In case this valve is not installed then the pipe section of the branched out pipe would remain dry during normal operation and high chances of damage and leakage can take place. When the downstream valve is installed the branched out water main contains water under normal operation. With two gate valves installed a leakage can be detected immediately.

What are the different approaches in designing the floors of the service reservoirs?

In general there are two main approaches of designing the reservoir floors to prevent leakage of water due to seasonal and shrinkage movements:

> In this approach the movement joints of the reservoir floor panels are such that the free expansion and contraction of the panels takes place. Every panel is isolated from the other panels and two panels have a sliding layer between them to help in sliding.

> The second method does not provide any room for free movement. With seasonal and shrinkage movements, some cracks are designed to voluntarily occur on the floors of the service reservoirs. These tiny cracks are spread throughout the floor and are simply too minute to cause any leakage or corrosion of the floors. But the difference also in this method is that the amount of reinforcement used is much more than the first approach.


Technical Interview Questions for Electronics Engineering Students


Electronics Engineering

What are different categories of antenna and give an example of each?

Different categories of antenna are as follows:

1. Wire Antennas - Short Dipole Antenna
2. Micro strip Antennas - Rectangular Micro strip (Patch) Antennas
3. Reflector Antennas - Corner Reflector
4. Travelling Wave Antennas - Helical Antennas
5. Aperture Antennas - Slot Antenna
6. Other Antennas - NFC Antennas

What is handover and what are its types?

Handover in mobile communication refers to the process of transferring a call from one network cell to another without breaking the call.
There are two types of handover which are as follows:

Hard Handoff: hard handoff is the process in which the cell connection is disconnected from the previous cell before it is made with the new one.

Soft Handoff: It is the process in which a new connection is established first before disconnecting the old one. It is thus more efficient and smart.

What is ionospheric bending?

When a radio wave travels into the ionospheric layer it experiences refraction due to difference in density. The density of ionospheric layer is rarer than the layer below which causes the radio wave to be bent away from the normal. Also the radio wave experiences a force from the ions in the ionospheric layer. If incident at the correct angle the radio wave is completely reflected back to the inner atmosphere due to total internal reflection. This phenomenon is called ionospheric reflection and is used in mobile communication for radio wave propagation also known as ionospheric bending of radio waves.

What is CDMA?

CDMA stands for Code Division Multiple Access which uses digital format. In CDMA systems several transmissions via the radio interface take place simultaneously on the same frequency bandwidth. User data is combined at the transmitter’s side with a code, then transmitted. On air, all transmission get mixed. At the receiver's side the same code is used as in the transmitter’s side. The code helps the receiver to filter the user information of the transmitter from incoming mixture of all transmissions on the same frequency band and same time.

Explain the concept of frequency re-use.

The whole of the geographical area is divided into hexagonal shape geometrical area called cell and each cell having its own transceiver. Each BTS (cell site) allocated different band of frequency or different channel. Each BTS antenna is designed in such a way that i cover cell area in which it is placed with frequency allotted without interfering other cell signals. The design process of selecting and allocating channel groups for all of the cellular base station within system is called frequency reuse.

Explain Bluetooth.

Bluetooth is designed to be a personal area network, where participating entities are mobile and require sporadic communication with others. It is omni directional i.e. it does not have line of sight limitation like infra red does. Ericsson started the work on Bluetooth and named it after the Danish king Harold Biuetooth. Bluetooth operates in the 2.4 GHz area of spectrum and provides a range of 10 metres. It offers transfer speeds of around 720 Kbps.

What are GPRS services?

GPRS services are defined to fall in one of the two categories :
- PTP ( Point to point)
- PTM ( Point to Multipoint)
Some of the GPRS services are not likely to be provided by network operators during early deployment of GPRS due in part to the phased development of standard. Market demand is another factor affecting the decision of operators regarding which services to offer first.

What are the advantages of CDMA?

Advantages of CDMA are as follows:

1. Frequency diversity: Transmission is spread out over a large bandwidth due to that less affected by noise. If bandwidth is increased S/N ratio increases, which means noise will be reduced.

2. Multiplication Resistance: Chipping codes used for CDMA not only exhibit low correlation but also low autocorrelation. Hence a version of the signal that is delayed by more than one chip interval does not interfere with dominant signal as in other multipath environments.

3. Privacy: Due to spread spectrum is obtained by the use of noise like signals, where each user has a unique code, so privacy is inherent.

4. Graceful Degradation: In CDMA, more users access the system simultaneously as compared to FDMA, TDMA.

What are the advantages of spread spectrum?

Spread spectrum has the following advantages:

1. No crosstalk interference.
2. Better voice quality/data integrity and less static noise.
3. Lowered susceptibility to multipath fading.
4. Inherent security.
5. Co-existence.
6. Longer operating distances.
7. Hard to detect.
8. Hard to intercept or demodulate.
9. Harder to jam than narrow bands.
10. Use of ranging and radar.

Explain the steps involved in demodulating a signal.

Once the signal is coded, modulated and then sent, the receiver must demodulate the signal. This is usually done in two steps:

1. Spectrum spreading (e.g., direct sequence or frequency hopping) modulation is removed.

2. The remaining information bearing signal is demodulated by multiplying with a local reference identical in structure and synchronized with received signal.

How can a Pseudo Random Noise Code be usable?

To be usable for direct sequence spreading, a PN code must meet the following conditions:

1. Sequence must be built from 2 leveled numbers.

2. The codes must have sharp autocorrelation peak to enable code synchronization.

3. Codes must have a low cross-correlation value, the lower it is, the more are the number of users which can be allowed in the system.

4. The codes should be “balanced” i.e. the difference between ones and zeros in code may only be 1.

What are the drawbacks of Walsh codes?

Walsh codes have the following drawbacks:

1. The codes do not have a single, narrow autocorrelation peak.

2. The spreading is not over the whole bandwidth; instead the energy is spread over a number of discrete frequency components.

3. Although the full sequence cross correlation is identically zero, this does not hold for a partial sequence cross correlation function. Thus advantage of using orthogonal codes is lost.

4. Orthogonality is also affected by channel properties like multi path.

Explain radio environment in building.

Building penetration: Building penetration depends on the material used for construction and architecture used. This varies building to building and is based on building construction.

Building Height Effect: The signal strength is always higher at top floor and generally floor gain height is about 2.7dB/floor which is not dependent on building construction.

Building Floor Reception: The signal isolation between floors in a multi floor building is on the average about 20dB. Within a floor of 150 * 150 feet, the propagation loss due to interior walls, depending on the wall materials is about 20 dB between the strong and the weak areas.

List some advantages of GSM.

Here are some advantages of GSM:

1. GSM is mature; this maturity means a more stable network with robust features.

2. Less signal deterioration inside buildings.

3. Ability to use repeaters.

4. Talk time is generally higher in GSM phones due to pulse nature of transmission.

5. The availability of Subscriber Identity Modules allows users to switch networks and handset at will.

6. GSM covers virtually all parts of world so international roaming is not a problem.

What are the various types of numbers for network identity?

Various types of number for network identity are as follows:

1. MSISDN (Mobile station ISDN) Number: It is international mobile subscriber number which is normally called mobile number. It is unique worldwide.

2. MSRN (Mobile Subscriber Routing Number): MSRN is used during mobile terminate trunk call to provide location of mobile subscriber.

3. HON (Hand Over Number): HON is used for providing information required to transfer call from one BSC to another BSC or to another MSC.

4. ISMI (International Mobile Subscriber Identity Number) : Purpose of ISMI is for location update and authentication.

5. TMSI (Temporary Mobile Subscriber Identity) : TMSI is used instead of IMSI to improve security efficiency of network.

6. IMEI: International Mobile Equipment Identity.

What are the functions of Base Station System ( BSS)?

Functions of BSS are as follows:

1. Radio path control.

2. BTS and TC control.

3. Connection establishment with MS-NSS.

4. Mobility management, speech transcoding.

5. Connection of statistical data.

What are the parts of Network Management System (NMS)?

Following are the parts of network management system:

1. OMC: Operation and maintenance center - Computerized monitoring center.

2. NMC: Network Management Center - Centralized control of a network is done here.

3. OSS: Operation and support system - Used for supporting activities performed in an OMC and/or NMC.

What are applications of DSP?

Some selected applications or digital signal processing that are often encountered in daily life are listed as follows:

1. Telecommunication: Echo cancellation in telephone networks.

2. Military Radar signal processing

3. Consumer electronics Digital Audio/TV

4. Instrumentation and control

5. Image processing image representation, image compression

6. Speech processing speech analysis methods are used in automatic speech recognition

7. Medicine Medical diagnostic instrumentation such as computerized tomography (CT)

8. Seismology DSP techniques are employed in geophysical exploration for oil and gas.

9. Signal Filtering Removal of unwanted background noise.

What is analog-to-digital conversion of signals?

A discrete-time signal is defined by specifying its value only at discrete times, called sampling instants. When the sampled values are quantized and encoded, a digital signal is obtained. A digital signal is obtained from the analog signal by using an analog-to-digital converter. This entire process is referred to as the conversion of signals from analog to digital form.

What are the properties of ROC for z-Transform?

Properties of the ROC for the z-Transform:

1. X (z) converges uniformly if and only if the ROC of the z-transform X(z) of the sequence includes the unit circle. The ROC of X(z) consists of a ring in the z-plane centered about the origin. That is, the ROC of the z-transform of x(n) has values of z for which x(n) r-n is absolutely summable.

2. The ROC does not contain any poles.

3. When x(n) is of finite duration then the ROC is the entire z-plane, except possibly z=0 and/or z=infinity.

4. If x(n) is a right sided sequence, the ROC will not include infinity.

5. If x(n) is a left sided sequence, the ROC will not include z=0. However if x(n)=0 for all n>0, the ROC will include z=0.

6. If x(n) is two sided and if the circle |z| = r0 is in the ROC, then the ROC will consist of a ring in the z-plane that includes the circle |z|=r0.

7. If X(z) is rational, then the ROC extends to infinity, i.e. the ROC is bounded by poles.

8. If x(n) is causal, then the ROC includes z=infinity.

9. If x(n) is anti- causal, trhen the ROC includes z=0.

What is meant by filter? What are the different types of filters?
An electrical circuit which is used to remove unwanted signals from the output of a system is called a filter. Filters can be classified into many types based on how they are built, the purpose they serve, the range of filtering etc.

Typically, they are classified as 
1) Low Pass filters (allows frequencies up to a cut-off freq)
2) High Pass filters(allows frequencies above a cut-off freq)
3) Band Pass filters(allows input frequencies in a specified range)
4) Band Reject filters(rejects frequencies in a specified range)

Why 440volts instead of 660volts in 3 phases of supply system?

In case of 1Ph supply voltage is measured in between Phase and neutral, but where as in the case of 3Ph supply it is been measured in between two phases of line which differ each other by an phase difference of 120 degrees. So resulting net voltage between two lines which differ each other by a phase difference of 120 degrees always hovers around 440V

What frequency bands are used in Satellite Communication?

L: 1-2
S: 2-4
C: 4-8
X: 8-12
Ku: 12-18
K: 18-26.5
Ka: 26.5-40
Q: 33-50


What are the differences between 8085 and 8086 Microprocessor?

  • 8086 has 20 address lines and 16 data lines and supports HARVARD architecture as compared to 8085 which has 16 address lines and 8 data lines, so 8086 has higher index and thus accessing large memory, also the operating speed of 8086 is greater due to presence of instruction queue.

·       
  •           8085 microprocessor does not contain inbuilt memory, ADC, DAC whereas 8086 microprocessor contains those additional features and hence we don't need to include external memory and thus the circuit becomes compact

·      
  •           8085 is 8 bit microprocessor and 8086 is 16 bit


Why BJT is known as current controlled device and FET is known as voltage controlled device?

  •       In BJT we give input as a current to the base so it operates taking small input current signal and gives large output current signal so it is called current controlled.In FET we give input voltage signal to the gate so the output will be of current signal so it is called voltage controlled device.
  •      In bipolar junction transistor, current conduction is only my majority carriers whereas in field effect transistor current conduction is by both majority as well as minority carriers. 

  •         BJT as current controlled device - Base current controls the collector an emitter currents.FET as voltage controlled device- Field of p or n region decides width of conducting channel in n type or p type FET.

What is meant by virtual ground in the op amp?

The op amp connected in a negative feedback configuration that is the o/p connected to the inverting terminal, tried to produce the same voltage at the inverting node as we applied to the non-inverting terminal, no matter whatever be the o/p.  This happens because the op-amp has a very high differential gain. so only way to not to clip or saturate the o/p in either positive or negative side is to make their both i/ps at the same potential. so when you apply the i/p to the inverting terminal and you connect the feedback to the inverting node, and your non-inverting terminal is grounded, then op amp tries to force the inverting node at the ground potential and whatever the difference between these two nodes are amplified.


Friday 3 July 2015

C programs for Job Interviews

Welcome back guys !!
Here are some common C programs that are usually asked in the job interviews. I hope practicing these programs will be enough to get prepared for the same.

Find out the perfect number using C program

Perfect number is a positive number which sum of all positive divisors excluding that number is equal to that number. For example 6 is perfect number since divisor of 6 are 1, 2 and 3.  Sum of its divisor is
1 + 2+ 3 =6
6 is the smallest perfect number. Next perfect number is 28 since 1+ 2 + 4 + 7 + 14 = 28 Some more perfect numbers: 496, 8128

#include<stdio.h>
int main(){
  int n,i=1,sum=0;

  printf("Enter a number: ");
  scanf("%d",&n);

  while(i<n){
      if(n%i==0)
           sum=sum+i;
          i++;
  }
  if(sum==n)
      printf("%d is a perfect number",i);
  else
      printf("%d is not a perfect number",i);

  return 0;
}


OUTPUT:
Enter a number: 6
6 is a perfect number

C program to print perfect numbers from 1 to 100
#include<stdio.h>
int main(){
  int n,i,sum;
  printf("Perfect numbers are: ");
  for(n=1;n<=100;n++){
    i=1;
    sum = 0;
    while(i<n){
      if(n%i==0)
           sum=sum+i;
          i++;
    }
    if(sum==n)
      printf("%d ",n);
  }
  return 0;
}

OUTPUT:
Perfect numbers are: 6 28

Check the given number is armstrong number or not using C program
Definition of Armstrong number or what is an Armstrong number:
Definition according to c programming point of view:
Those Numbers Which Sum Of The Cube Of Its Digits Is Equal To That Number Are Known As Armstrong Numbers. For Example 153 Since 1^3 + 5^3 + 3^3 = 1+ 125 + 9 =153
Other Armstrong Numbers: 370,371,407 Etc.
#include<stdio.h>
int main(){
    int num,r,sum=0,temp;

    printf("Enter a number: ");
    scanf("%d",&num);

    temp=num;
    while(num!=0){
         r=num%10;
         num=num/10;
         sum=sum+(r*r*r);
    }
    if(sum==temp)
         printf("%d is an Armstrong number",temp);
    else
         printf("%d is not an Armstrong number",temp);

    return 0;
}

OUTPUT:
Enter a number: 153
153 is an Armstrong number

Check given number is prime number or not using C program
Definition of prime number:
A natural number greater than one has not any other divisors except 1 and itself. In other word we can say which has only two divisors 1 and number itself. For example: 5
Their divisors are 1 and 5.
Note: 2 is only even prime number.
Logic for prime number in c
We will take a loop and divide number from 2 to number/2. If the number is not divisible by any of the numbers then we will print it as prime number.

#include<stdio.h>
int main(){
    int num,i,count=0;
    printf("Enter a number: ");
    scanf("%d",&num);
    for(i=2;i<=num/2;i++){
        if(num%i==0){
         count++;
            break;
        }
    }
   if(count==0 && num!= 1)
        printf("%d is a prime number",num);
   else
      printf("%d is not a prime number",num);
   return 0;
}

OUTPUT:
Enter a number: 5
5 is a prime number

SUM OF PRIME NUMBERS
#include<stdio.h>
int main(){
    int num,i,count,min,max,sum=0;
     printf("Enter min range: ");
     scanf("%d",&min);
    printf("Enter max range: ");
    scanf("%d",&max);
    for(num = min;num<=max;num++){
         count = 0;
         for(i=2;i<=num/2;i++){
             if(num%i==0){
                 count++;
                 break;
             }
        }
         if(count==0 && num!= 1)
             sum = sum + num;
    }
    printf("Sum of prime numbers is: %d ",sum);
   return 0;
}

OUTPUT:
Enter min range: 50
Enter max range: 100

C program to check a number is odd or even.


#include<stdio.h>
int main(){
    int number;
    printf("Enter any integer: ");
    scanf("%d",&number);
    if(number % 2 ==0)
         printf("%d is even number.",number);
    else
         printf("%d is odd number.",number);
    return 0;
}
Write a C program to check given number is palindrome number or not
Definition of Palindrome number or What is palindrome number?
A number is called palindrome number if it is remain same when its digits are reversed. For example 121 is palindrome number. When we will reverse its digit it will remain same number i.e. 121
Palindrome numbers examples: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 111, 121, 131, 141, 151, 161, 171, 181, 191 etc.

#include<stdio.h>
int main(){
    int num,r,sum=0,temp;
    printf("Enter a number: ");
    scanf("%d",&num);
    temp=num;
    while(num){
         r=num%10;
         num=num/10;
         sum=sum*10+r;
    }
    if(temp==sum)
         printf("%d is a palindrome",temp);
    else
         printf("%d is not a palindrome",temp);
    return 0;
}
C program to check if a number is palindrome using recursion
#include<stdio.h>
int checkPalindrome(int);
int main(){
    int num,sum;
    printf("Enter a number: ");
    scanf("%d",&num);
    sum = checkPalindrome(num);
    if(num==sum)
         printf("%d is a palindrome",num);
    else
    printf("%d is not a palindrome",num);
    return 0;
}
int checkPalindrome(int num){
    static int sum=0,r;
    if(num!=0){
         r=num%10;
         sum=sum*10+r;
         checkPalindrome(num/10);
    }
    return sum;
}
Write a C program to check given string is palindrome number or not.
Definition of Palindrome string:

A string is called palindrome if it symmetric. In other word a string is called palindrome if string remains same if its characters are reversed. For example: asdsa
If we will reverse it will remain same i.e. asdsa
Example of string palindrome:  a,b, aa,aba,qwertrewq etc.

#include<string.h>
#include<stdio.h>
int main(){
  char *str,*rev;
  int i,j;
  printf("\nEnter a string:");
  scanf("%s",str);
  for(i=strlen(str)-1,j=0;i>=0;i--,j++)
      rev[j]=str[i];
      rev[j]='\0';
  if(strcmp(rev,str))
      printf("\nThe string is not a palindrome");
  else
      printf("\nThe string is a palindrome");
  return 0;
}
Write a C program to print Fibonacci series of given range.
Algorithm:
What is Fibonacci series?
Logic of Fibonacci series
Definition of Fibonacci numbers:
We assume first two Fibonacci are 0 and 1
A series of numbers in which each sequent number is sum of its two previous numbers is known as Fibonacci series and each numbers are called Fibonacci numbers. So Fibonacci numbers is
Algorithm for Fibonacci series 
Fn = Fn-2 + Fn-1
Example of Fibonacci series:
0 , 1 ,1 , 2 , 3 , 5 , 8 , 13 , 21 , 34 , 55  …

#include<stdio.h>
int main(){
    int k,r;
    long int i=0l,j=1,f;
 
  //Taking maximum numbers form user
    printf("Enter the number range:");
    scanf("%d",&r);
    printf("FIBONACCI SERIES: ");
    printf("%ld %ld",i,j); //printing firts two values.
    for(k=2;k<r;k++){
         f=i+j;
         i=j;
         j=f;
         printf(" %ld",j);
    }
    return 0;
}
Write a C program to get factorial of given number.

Algorithm:
Factorial value
Factorial of number is defined as:
Factorial (n) = 1*2*3 … * n
For example: Factorial of 5 = 1*2*3*4*5 = 120
Note: Factorial of zero = 1

#include<stdio.h>
int main(){
  int i=1,f=1,num;
  printf("Enter a number: ");
  scanf("%d",&num);
  while(i<=num){
      f=f*i;
      i++;
  }
  printf("Factorial of %d is: %d",num,f);
  return 0;
}

C program to print hello world without using semicolon


#include<stdio.h>
void main(){
    if(printf("Hello world")){
    }
}

Solution: 2

#include<stdio.h>
void main(){
    while(!printf("Hello world")){
    }
}

Solution: 3

#include<stdio.h>
void main(){
    switch(printf("Hello world")){
    }
}

Program in C to print 1 to 100 without using loop


#include<stdio.h>
int main(){
    int num = 1;
    print(num);
    return 0;
}
int print(num){
    if(num<=100){
         printf("%d ",num);
         print(num+1);
    }
}

How to convert string to int without using library functions in C


#include<stdio.h>
int stringToInt(char[] );
int main(){
    char str[10];
    int intValue;
    printf("Enter any integer as a string: ");
    scanf("%s",str);
   intValue = stringToInt(str);
    printf("Equivalent integer value: %d",intValue);
    return 0;
}
int stringToInt(char str[]){
    int i=0,sum=0;
    while(str[i]!='\0'){
         if(str[i]< 48 || str[i] > 57){
             printf("Unable to convert it into integer.\n");
             return 0;
         }
         else{
             sum = sum*10 + (str[i] - 48);
             i++;
         }
    }
    return sum;
}

Write a C program to find out prime factor of given number


#include<stdio.h>
int main(){
  int num,i=1,j,k;
  printf("\nEnter a number:");
  scanf("%d",&num);
  while(i<=num){
      k=0;
      if(num%i==0){
         j=1;
          while(j<=i){
            if(i%j==0)
                 k++;
             j++;
          }
          if(k==2)
             printf("\n%d is a prime factor",i);
      }
      i++;
   }
   return 0;
}
Write a C program to add two numbers without using addition operator
Algorithm:
In c ~ is 1’s complement operator. This is equivalent to:
~a = -b + 1
So, a – ~b -1
= a-(-b + 1) + 1
= a + b – 1 + 1
= a + b

#include<stdio.h>
int main(){
    int a,b;
    int sum;
    printf("Enter any two integers: ");
    scanf("%d%d",&a,&b);
    //sum = a - (-b);
    sum = a - ~b -1;
    printf("Sum of two integers: %d",sum);
    return 0;
}

Write a C program to swap two numbers without using third variable


#include<stdio.h>
int main(){
    int a=5,b=10;

    //process one
    a=b+a;
    b=a-b;
    a=a-b;
    printf("a= %d  b=  %d",a,b);

    //process two
    a=5;b=10;
    a=a+b-(b=a);
    printf("\na= %d  b=  %d",a,b);

    //process three
    a=5;b=10;
    a=a^b;
    b=a^b;
    a=b^a;
    printf("\na= %d  b=  %d",a,b);

    //process four
    a=5;b=10;
    a=b-~a-1;
    b=a+~b+1;
    a=a+~b+1;
    printf("\na= %d  b=  %d",a,b);

    //process five
    a=5,b=10;
    a=b+a,b=a-b,a=a-b;
    printf("\na= %d  b=  %d",a,b);

    return 0;
}

C program for swapping of two numbers using pointers


#include<stdio.h>
int main(){
    int a,b;
    int *ptra,*ptrb;
    int *temp;
    printf("Enter any two integers: ");
    scanf("%d%d",&a,&b);
    printf("Before swapping: a = %d, b=%d",a,b);
    ptra = &a;
    ptrb = &b;
     temp = ptra;
    *ptra = *ptrb;
    *ptrb = *temp;
    printf("\nAfter swapping: a = %d, b=%d",a,b);
    return 0;
}

Write a C program to find out second largest element of an unsorted array


#include<stdio.h>
int main(){
  int a[50],size,i,j=0,big,secondbig;
  printf("Enter the size of the array: ");
  scanf("%d",&size);
  printf("Enter %d elements in to the array: ", size);
  for(i=0;i<size;i++)
      scanf("%d",&a[i]);
  big=a[0];
  for(i=1;i<size;i++){
      if(big<a[i]){
           big=a[i];
           j = i;
      }
  }
  secondbig=a[size-j-1];
  for(i=1;i<size;i++){
      if(secondbig <a[i] && j != i)
          secondbig =a[i];
  }
  printf("Second biggest: %d", secondbig);
  return 0;
}

Write a C program to find out largest element of an array

 

#include<stdio.h>
int main(){
  int a[50],size,i,big;
  printf("\nEnter the size of the array: ");
  scanf("%d",&size);
  printf("\nEnter %d elements in to the array: ”, size);
  for(i=0;i<size;i++)
      scanf("%d",&a[i]);
  big=a[0];
  for(i=1;i<size;i++){
      if(big<a[i])
           big=a[i];
  }
  printf("\nBiggest: %d",big);
  return 0;
}

Write a C program to find out L.C.M. of two numbers


#include<stdio.h>
int main(){
  int n1,n2,x,y;
  printf("\nEnter two numbers:");
  scanf("%d %d",&n1,&n2);
  x=n1,y=n2;
  while(n1!=n2){
      if(n1>n2)
           n1=n1-n2;
      else
      n2=n2-n1;
  }
  printf("L.C.M=%d",x*y/n1);
  return 0;
}
Write a C program to find out H.C.F. of two numbers

Logic for writing program:
It is clear that any number is not divisible by greater than number itself. In case of more than one numbers, a possible maximum number which can divide all of the numbers must be minimum of all of that numbers.
For example: 10, 20, and 30
Min (10, 20, 30) =10 can divide all there numbers. So we will take one for loop which will start form min of the numbers and will stop the loop when it became one, since all numbers are divisible by one. Inside for loop we will write one if conditions which will check divisibility of both the numbers.

#include<stdio.h>
int main(){
    int x,y,m,i;
    printf("Insert any two number: ");
    scanf("%d%d",&x,&y);
    if(x>y)
         m=y;
    else
         m=x;
    for(i=m;i>=1;i--){
         if(x%i==0&&y%i==0){
             printf("\nHCF of two number is : %d",i) ;
             break;
         }
    }
    return 0;
}

Write a C program to convert the string from upper case to lower case


#include<stdio.h>
#include<string.h>
int main(){
  char str[20];
  int i;
  printf("Enter any string->");
  scanf("%s",str);
  printf("The string is->%s",str);
  for(i=0;i<=strlen(str);i++){
      if(str[i]>=65&&str[i]<=90)
       str[i]=str[i]+32;
  }
  printf("\nThe string in lower case is->%s",str);
  return 0;
}

Write a C program to convert the string from lower case to upper case


#include<stdio.h>
int main(){
  char str[20];
  int i;
  printf("Enter any string->");
  scanf("%s",str);
  printf("The string is->%s",str);
  for(i=0;i<=strlen(str);i++){
            if(str[i]>=97&&str[i]<=122)
            str[i]=str[i]-32;
  }
  printf("\nThe string in lowercase is->%s",str);
  return 0;
}

Write a C program to find factorial of a number using recursion


#include<stdio.h>
int fact(int);
int main(){
  int num,f;
  printf("\nEnter a number: ");
  scanf("%d",&num);
  f=fact(num);
  printf("\nFactorial of %d is: %d",num,f);
  return 0;
}

int fact(int n){
   if(n==1)
       return 1;
   else
       return(n*fact(n-1));
 }

Write a C program to find out sum digits of a number using recursion


#include<stdio.h>
int main(){
  int num,x;
  clrscr();
  printf("\nEnter a number: ");
  scanf("%d",&num);
  x=findsum(num);
  printf("Sum of the digits of %d is: %d",num,x);
  return 0;
}

int r,s;
int findsum(int n){
if(n){
         r=n%10;
         s=s+r;
         findsum(n/10);
     }
     else
       return s;
}