What Questions to ask the HR

No comments :

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 conscious? In what ways?
  • In what ways is a career with your company better than one with your competitors?
  • Is this a new position or am I replacing someone?
  • What is the largest single problem facing your staff (department) now?
  • May I talk with the last person who held this position?
  • What qualities are you looking for in the candidate who fills this position?
  • What skills are especially important for someone in this position?
  • What characteristics do the achievers in this company seem to share?
  • Who was the last person that filled this position, what made them successful at it, where are they today, and how may I contact them?
  • Is there a lot of team/project work?
  • Will I have the opportunity to work on special projects?
  • Where does this position fit into the organizational structure?
  • How much travel, if any, is involved in this position?
  • What is the next course of action? When should I expect to hear from you or should I contact you?
Feel free to add more in comments section!! :)

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

No comments :
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) the values cannot be predicted exactly. Depending on the number of bytes, the precession with of the value represented varies. Float takes 4 bytes and long double takes 10 bytes. So float stores 0.9 with less precision than long double.
Rule of Thumb:
Never compare or at-least be cautious when using floating point numbers with relational operators (== , >, <, <=, >=,!= ) .

4. main() {
 static int var = 5;
printf("%d ",var--);
 if(var)
 main();
 }

Answer:
5 4 3 2 1
Explanation:
When static storage class is given, it is initialized once. The change in the value of a static variable is retained even between the function calls. Main is also treated like any other ordinary function, which can be called recursively.

5. main() {
int c[ ]={2.8,3.4,4,6.7,5};
int j,*p=c,*q=c;
for(j=0;j<5;j++) {
printf(" %d ",*c);
 ++q; }
for(j=0;j<5;j++){printf(" %d ",*p);
++p; }
}

Answer:
 2 2 2 2 2 2 3 4 6 5
Explanation:
Initially pointer c is assigned to both p and q. In the first loop, since only q is incremented and not c , the value 2 will be printed 5 times. In second loop p itself is incremented. So the values 2 3 4 6 5 will be printed.

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

No comments :
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 (char *) cast were omitted, the compiler would not know to pass a null pointer, and would pass an integer 0 instead. (Note that many Unix manuals get this example wrong.)

When function prototypes are in scope, argument passing becomes an "assignment context," and most casts may safely be omitted, since the prototype tells the compiler that a pointer is required, and of which type, enabling it to correctly cast unadorned 0's. Function prototypes cannot provide the types for variable arguments in variable-length argument lists, however, so explicit casts are still  required for those arguments. It is safest always to cast null pointer function arguments, to guard against varargs functions or those without prototypes, to allow interim use of non-ANSI compilers, and to demonstrate that you know what you are doing.

Summary:
Unadorned 0 okay: Explicit cast required:
initialization function call, no prototype in scope assignment variable argument in comparison arargs function call, prototype in scope, fixed argument

References: K&R I Sec. A7.7 p. 190, Sec. A7.14 p. 192; K&R II
Sec. A7.10 p. 207, Sec. A7.17 p. 209; H&S Sec. 4.6.3 p. 72; ANSI
Sec. 3.2.2.3 .

What is this infamous null pointer, anyway?

No comments :
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, the compiler must always be informed which type of null pointer is required, so it can make the distinction if necessary (see below).

References: K&R I Sec. 5.4 pp. 97-8; K&R II Sec. 5.4 p. 102; H&S
Sec. 5.3 p. 91; ANSI Sec. 3.2.2.3 p. 38.

Aptitude Test Practice Questions - With Answers

No comments :
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 children
    B.   Married, with at least one son
    C.   Unmarried, with at least one daughter
    D.   Unmarried, with at least one son
    E.   Unmarried, with no children

Answer:
D (married: no; children: yes; male child: yes)

Question 4. Susan can type 10 pages in 5 minutes. Mary can type 5 pages in 10 minutes. Working together, how many pages can they type in 30 minutes?
    A.   15
    B.   20
    C.   25
    D.   65
    E.   75

Answer:
E (30/5=6; 6*10=60; Susan will type 60 pages in 30 min. 30/10=3; 5*3=15; Mary will type 15 pages in 30 min. 60+15=75)

Question 5. Consider the following series:
3, 4, 6, 9, 13, ____ What comes next?
    A.   15
    B.   16
    C.   17
    D.   18
    E.   19

Answer:
D (3+1=4; 4+2=6; 6+3=9; 9+4=13; 13+5=18)

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

No comments :
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 :-
  1. 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 yrs. 
    • Former Army pers who died during service/after retirement and family pension is granted. 
    • TA pers who have completed 10 yrs of embodied service. 
    • DSC pers who are serving or retired with pension.
  1. War widow (in receipt of liberalized pension) and children in receipt of family pension (due to death of both parents) are also eligible.
  2. Details of eligibility of adopted/step children are as in the prospectus.
  3. Should have passed, or appeared for 10+2 exam, at the time of applying for admission to AIT. Minimum acceptable mark in PCM are 50%.
  4. Age of the candidate must be between 16 to 21 years on 01 Jul 2014.
  5. Must be an Indian citizen, or a PIO who obtains Indian citizenship before admission.

JEE Application Form:

Candidate can apply for JEE 2015  'Online'. For this candidates are advised to visit www.jeemain.nic.in. Details can be obtained from

Executive Director
JEE Main Secretariat
Central Board of Secondary Education
PS 1-2, Institutional Area, IP Extension
Patparganj, Delhi - 110 092
Tel: 91-11-22239177-80 Extn 110,151 &157
Fax: 011-22246095

AIT Application Form:

JEE Application Form should be filled before AIT Application Form. The JEE Roll No must be endorsed on the AIT Application Form before submitting it to AIT. Failure to do so would result in rendering the AIT Application Form null and void.

Prospectus and Application Form can be obtained by hand or by post from AIT as well as from HQ Commands and Army HQ (AWES Branch). The Prospectus can also be downloaded from the institute website.

Cost of Prospectus and Application form is as follows:- 

By Post :- Rs 820/- through bank Demand Draft drawn in favour of Director, AIT payable at Pune.
By Hand :- Rs 750/- through bank Demand Draft drawn in favour of Director, AIT payable at Pune.
Down-loaded Forms:- Down-loaded Application Form should be accompanied with a bank Demand Draft for Rs 750/- drawn in favour of Director, AIT payable at Pune. The details of Bank Draft should be mentioned clearly in the Application Form.
Counseling at AIT, Pune, will be after one month from the date of declaration of JEE Results. Dates of counseling will be hosted on the AIT website

Note : Filling up of JEE form and AIT Form is compulsory. Failing to fill up any one of the form will lead to rejection of admission to AIT.

For more details refer official website

 Contact Details
 Address : Army Institute of Technology, Dighi Hills, Pune-411015
 Phone : 020-27157534, 27157612
 Fax : 020-27157534
 Mobile :
 E-mail : Contact I
 Website : www.aitpune.com/