Skip to main content

Posts

CIVIL SERVICES' (I.A.S.) EXAMINATION

The Union Public Service Commission (U.P.S.C.)  conducts Civil Services' Examination once a year in two stages. The Preliminary Examination (Objective Type) for selection of candidates for the Main Examination is held in the month of May. The Civil Services Main Examination  is held in the months of October/November. Blank application forms and other particulars are published in the Employment News, generally in the month of December. The last date for the submission of applications to the Secretary, Union Public Service Commission, Dholpur House, Shahjahan Road, NewDelhi-11001 1 is usually the last week of January of the year of examination. The Combined Civil Services Examination is conducted for Recruitment to the following Services/Posts: 1. Indian Administrative Service. 2. Indian Foreign Service. 3. Indian Police Service. 4. Indian P & T Accounts & Finance Service, Group 'A'. 5. Indian Audit and Accounts Service, Group 'A'. 6. Indian Customs and Centr...

AGRICULTURAL SCIENTIST RECRUITMENT BOARD

Agricultural Research Service National   Eligibility  Test/ Senior Research Fellowship Examination  The Agricultural Scientists Recruitment Board (ASRB)  holds a Competitive Examination for recruiting Scientists of the ARS in the pay scale of Rs. 8,000-13,500 in the ICAR Institutes, combined with National Eligibility Test (NET) for recruitment of Lecturers and Assistant Professors by the State Agricultural Universities (SAUS) and for award of ICAR Senior Research Fellowships. The selected candidates for Agricultural Research Service must serve in the institutes to which they are posted until they find appointment for higher positions through selection at other institutes. (i) Candidates successful in ARS are appointed as Scientists in the Indian Council of Agricultural Research in the pay scale of Rs. 8,000-13,500. (ii) Candidates clearing the National Eligibility Test are recommended to various State Agricultural Universities who will consider them for appointmen...

What Questions to ask the HR

Few questions you should ask the HR : What kinds of assignments might I expect the first six months on the job? How often are performance reviews given? Please describe the duties of the job for me. What products (or services) are in the development stage now? Do you have plans for expansion? What are your growth projections for next year? Have you cut your staff in the last three years? Are salary adjustments geared to the cost of living or job performance? Does your company encourage further education? How do you feel about creativity and individuality? Do you offer flextime? What is the usual promotional time frame? Does your company offer either single or dual career-track programs? What do you like best about your job/company? Once the probation period is completed, how much authority will I have over decisions? Has there been much turnover in this job area? Do you fill positions from the outside or promote from within first? Is your company environmentally ...

Predict the output or error(s) for the following:

1 . void main(){ int const * p=5; printf("%d",++(*p)); } Answer: Compiler error: Cannot modify a constant value. Explanation: p is a pointer to a "constant integer". But we tried tochange the value of the "constant integer". 2. main() {  char s[ ]="man"; int i;  for(i=0;s[ i ];i++) printf("\n%c%c%c%c",s[i],*(s+i),*(i+s),i[s]); } Answer: mmmm aaaa nnnn Explanation: s[i], *(i+s), *(s+i), i[s] are all different ways of expressing the same idea. Generally array name is the base address for that array. Here s is the base address. i is the index number/displacement from the base address. So, indirecting it with * is same as s[i]. i[s] may be surprising. But in the case of C it is same as s[i]. 3 . main(){  float me = 1.1;  double you = 1.1;  if(me==you) printf("I love U"); else printf("I hate U"); } Answer: I hate U Explanation : For floating point numbers (float, double, long double) ...

How do I "get" a null pointer in my programs?

Answer : According to the language definition, a constant 0 in a pointer context is converted into a null pointer at compile time. That is, in an initialization, assignment, or comparison when one side is a variable or expression of pointer type, the compiler can tell that a constant 0 on the other side requests a null pointer, and generate the correctly-typed null pointer value. Therefore, the following fragments are perfectly legal: char *p = 0; if(p != 0) However, an argument being passed to a function is not necessarily recognizable as a pointer context, and the compiler may not be able to tell that an unadorned 0 "means" a null pointer. For instance, the Unix system call "execl" takes a variable-length, null-pointer-terminated list of character pointer arguments. To generate a null pointer in a function call context, an explicit cast is typically required: execl("/bin/sh", "sh", "-c", "ls", (char *)0); If the (c...

What is this infamous null pointer, anyway?

Answer : The language definition states that for each pointer type, there is a special value -- the "null pointer" -- which is distinguishable from all other pointer values and which is not the address of any object. That is, the address-of operator & will never yield a null pointer, nor will a successful call to malloc. (malloc returns a null pointer when it fails, and this is a typical use of null pointers: as a "special" pointer value with some other meaning, usually "not allocated" or "not pointing anywhere yet.") A null pointer is conceptually different from an uninitialized pointer. A null pointer is known not to point to any object; an uninitialized pointer might point anywhere. See also questions 49, 55, and 85. As mentioned in the definition above, there is a null pointer for each pointer type, and the internal values of null pointers for different types may be different. Although programmers need not know the internal values, t...

Aptitude Test Practice Questions - With Answers

Question 1 . Which of the following is least like the others? A.    cube B.    sphere C.    pyramid D.    circle Anwser: D (because the circle is the only two-dimensional figure) Question 2 . Consider a language which uses the following set of characters: Small set: { a b c } Large set: { A B C } Punctuation set: { x y } This language must follow the following rules:   1.    A punctuation character must end all series.   2.    A series can have up to but no more than 4          characters,including punctuation characters. Does the following series follow all the rules of the language defined above? axBy   A.    Yes   B.    No Answer: A (the series has only four characters and ends in a punctuation character) Question 3 . Consider the following flow chart for a customer: The person in No.1 is:     A.   Married, with...

Army Institute of Technology, Pune : Addmition 2015 - Based on JEE

Important Dates: Last date for submission of completed AIT Application Form: April 30, 2015 Date of JEE (Main)-2014 (offline) :   April 4, 2015 Date of JEE (Main)-2014 Online :         April-10 - 11, 2015 Army Institute of Technology, Pune invites application to admission for the year 2015-2016 for the BE Courses commencing in July/August. AIT admission is based on the merit of JEE. All applicants are therefore required to appear in JEE and also apply to AIT. Eligibility: The eligibility criteria for admission to AIT is given in detail in the Prospectus which is available in February every year. Brief outline is as below :- Candidate must be a ward of one of the following :-   Serving Army Persons.  Serving medical officers of IN and IAF who have served in the Army for more than 10 yrs and are members of AOBF.  Retired Army pers who in receipt of regular pension, or former Army pers who retired after min service of 10...

What is Encapsulation

Encapsulation in the mechanism that binds together code and data and that leaps both safe from outside interference or misuse. It also allows the creation of an object. More simply, an object in a logical entity that encapsulate both data and the code that manipulators that data. Within an object, some of the code and/ or data may be private to the objected and in accessible to anything outside the object. In this way and object provides a significant level of protection against some other unrelated part of the program accidentally modifying or incorrectly using the private parts of the object.

What is Data abstraction in oop

The wrapping up of data and functions into a single unit (called class) is known as encapsulation. Data encapsulation is the most striking feature of a class. The data is not accessible to the outside world and only those functions which are wrapped in the class can access it. These functions provide the interface between the object’s data and the program. This insulation of the data from direct access by the program is called ‘ data hiding ‘. Abstraction refers to the act of representing essential features without including the background details or explanations. Classes use the concept of abstraction and are defined as a list of abstract attributes such as size, weight and cost, and functions to operate on these attributes. They encapsulate al1 the essential properties of the objects that are to be created. Since the classes use the concept of data abstraction, they are known as Abstract Data Types (ADT).

Matrices: An introduction

This tutorial discusses some of the ins and outs of matrices. Matrices can be fun, but more importantly, they can really save you time.  Introduction A matrix is, by definition, a rectangular array of numeric or algebraic quantities which are subject to mathematical operations. Matrices can be defined in terms of their dimensions (number of rows and columns). Let us take a look at a matrix with 4 rows and 3 columns (we denote it as a 4×3 matrix and call it  A ): Each individual item in a matrix is called a cell, and can be denoted by the particular row and column it resides in. For instance, in matrix A, element a32 can be found where the 3rd row and the 2nd column intersect. What are they used for? Matrices are used to represent complicated or time-consuming mathematical operations. A single matrix can hold an infinite number of calculations, which can then be applied to a number, vector, or another matrix. There are several operations that can be done on matr...

Two sticks and matchbox, measure exactly 45 minutes by burning these sticks

Question: You have two sticks and matchbox. Each stick takes exactly an hour to burn from one end to the other. The sticks are not identical and do not burn at a constant rate. As a result, two equal lengths of the stick would not necessarily burn in the same amount of time.  How would you measure exactly 45 minutes by burning these sticks? Answer: This puzzle used to be asked in Wall Street interviews long time ago. It is very rare for this question to be asked now but it is a very good question to help you think a little outside the normal thought process. The answer is really simple. Since the sticks do not burn at a constant rate, we can not use the length of the stick as any sort of measurement of time. If we light a stick, it takes 60 minutes to burn completely. What if we light the stick from both sides? It will take exactly half the original time, i.e. 30 minutes to burn completely. 0 minutes – Light stick 1 on both sides and stick 2 on one s...

Aptitude Question - what is the proportion of boys to girls in the country?

Question: In a country where everyone wants a boy, each family continues having babies till they have a boy. After some time, what is the proportion of boys to girls in the country? (Assuming probability of having a boy or a girl is the same) Answer: This is a very simple probability question in a software interview. This question might be a little old to be ever asked again but it is a good warm up. Assume there are C number of couples so there would be C boys. The number of girls can be calculated by the following method. Number of girls = 0*(Probability of 0 girls) + 1*(Probability of 1 girl) + 2*(Probability of 2 girls) + … Number of girls = 0*(C*1/2) + 1*(C*1/2*1/2) + 2*(C*1/2*1/2*1/2) + … Number of girls = 0 + C/4 + 2*C/8 + 3*C/16 + … Number of girls = C (using mathematical formulas; it becomes apparent if you just sum up the first 4-5 terms) Thus the proportion of boys to girls is 1 : 1 .

Finding the sub-array with the largest sum.

Question: You are given an array with integers (both positive and negative) in any random order. Find the sub-array with the largest sum. Answer: This is an all-time favorite software interview question. The best way to solve this puzzle is to use Kadane’s algorithm which runs in O(n) time. The idea is to keep scanning through the array and calculating the maximum sub-array that ends at every position. The sub-array will either contain a range of numbers if the array has intermixed positive and negative values, or it will contain the least negative value if the array has only negative values. Here’s some code to illustrate.   void maxSumSubArray( int *array, int len, int *start, int *end, int *maxSum ) { int maxSumSoFar = -2147483648; int curSum = 0; int a = b = s = i = 0; for( i = 0; i < len; i++ ) { curSum += array[i]; if ( curSum > maxSumSoFar ) { maxSumSoFar = curSum; a = s; b = i; ...

Reverse a Linked-list. Write code in C.

Question : Reverse a Linked-list. Write code in C. Answer: There are multiple ways to go about this. Let’s first look at a recursive solution.   Node * reverse( Node * ptr , Node * previous) { Node * temp; if(ptr->next == NULL) { ptr->next = previous; return ptr; } else { temp = reverse(ptr->next, ptr); ptr->next = previous; return temp; } } reversedHead = reverse(head, NULL); Now for a non-recursive solution.   Node * reverse( Node * ptr ) { Node * temp; Node * previous = NULL; while(ptr != NULL) { temp = ptr->next; ptr->next = previous; previous = ptr; ptr = temp; } return previous; }   If anyone has any modifications or a better methods, please post it up. Comments are always welcome.

TCS Aptitude test, Placement Questions with Solution

1) If log 0.317=0.3332 and log 0.318=0.3364 then find log 0.319 ? Sol: log 0.317=0.3332 and log 0.318=0.3364, then log 0.319=log0.318+(log0.318-log0.317) = 0.3396 2) A box of 150 packets consists of 1kg packets and 2kg packets. Total weight of box is 264kg. How many 2kg packets are there ? Sol: x= 2 kg Packs y= 1 kg packs x + y = 150     .......... Eqn 1 2x + y = 264   .......... Eqn 2 Solve the Simultaneous equation; x = 114 so, y = 36 ANS :  Number of 2 kg Packs = 114. 3) My flight takes of at 2am from a place at 18N 10E and landed 10 Hrs later at a place with coordinates 36N70W. What is the local time when my plane landed? Options: a)6:00 am b) 6:40am c) 7:40 d) 7:00 e) 8:00 Sol: The destination place is 80 degree west to the starting place. Hence the time difference between these two places is 5 hour 20 min. (=24hr*80/360). When the flight landed, the time at the starting place is 12 noon (2 AM + 10 hours). Hence, the time at the dest...

Upcoming Exams Dates and Details- Government, Bank..

Upcoming Notifications: Banks : Recruitment Board Post name SBI Clerks SBI Associate Bank PO UPSC : Post Date Exam Name Last Date 17/05/2014 Civil Services (Preliminary) Exam 2014 16/06/2014 17/05/2014 Indian Forest Services (Preliminary) Exam 2014 16/06/2014 21/06/2014 NDA & NA Exam (II) 2014 21/07/2014 19/07/2014 CDS Exam(II) 2014 18/08/2014 SSC : Post Date Exam Name Last Date 24/05/2014 Stenographer (Gr C&D) Exam 2014 20/06/2014 19/07/2014 Combined Higher Secondary (10+2) Exam 2014 15/08/2014 09/08/2014 Junior Translator (CSOLS)/Jr Hindi Translator Exam 2014 05/09/2014 Indian Army : Notification Date Name of The Course Tentative Course of Commencement . TNPSC : Post Date Exam Name Tentative Vacancies 1st Week of March 2014  (To be Notified Later) Group VI Examination (Forest Apprentice) 26 3rd Week of March 2014  (To be Notified Later) Ass...

Head First Java 2nd Edition - Popular Book

  Rs. 625 This is a book that is tailored for Java novices. Ideal for those who are interested in learning Java but have been put off by the complexities of learning the language, Head First Java explores a new way of teaching the same. Head First Java is aimed at people who are complete novices when it comes to programming with the language, and the book makes the learning experience fun - one that?s filled with innovative and novel measures. If you?re not a fan of wracking your brain with dull theoretical concepts that put you to sleep, Head First Java can be a welcome addition to your shelf. The book starts from the fundamentals and progresses to extremely advanced levels, employing an easy-to-learn approach throughout. From distributed programming with RMI and network sockets, object oriented design, and object properties and methods, to graphical user interfaces, Java archives, network connectivity and Java 5.0, the book explores every facet of th...

Android device emulator shortcuts

Escape - Back button Home - Home button F2, PageUp - Menu button Shift-F2, PageDown - Start button F3 - Call/Dial button F4 - Hangup/EndCall button F5 - Search button F7 - Power button Ctrl-F3, Ctrl-KEYPAD_5 - Camera button Ctrl-F5, KEYPAD_PLUS - Volume up button Ctrl-F6, KEYPAD_MINUS - Volume down button KEYPAD_5 DPAD - center KEYPAD_4, KEYPAD_6 DPAD left, DPAD - right KEYPAD_8, KEYPAD_2 DPAD up, DPAD - down F8 - Toggle cell network on/off F9 - Toggle code profiling (when -trace set) Alt-ENTER - Toggle fullscreen mode Ctrl-T Toggle - trackball mode Ctrl-F11, - KEYPAD_7 Ctrl-F12, - KEYPAD_9

Android Best Practices for User input, Background jobs, Performance, Security and privacy - Android

T here are some practices that you can follow while developing android application. These are suggested by the android itself and they keep on improving with respect to time. These best practices include interaction design features , performance , security and privacy , compatibility , testing , distributing and monetizing tips. They are narrowed down and are listed as below. Best Practices - User input Every text field is intented for a differnet job. For example, some textfields are for text and some are for numbers. If it is for numbers then it is better to dispaly the numeric keypad when that textfield is focused. Its syntax is. <EditText            android:id="@+id/phone"            android:layout_width="fill_parent"            android:layout_height="wrap_content"          ...