Free Essay

C++ Interview Tips

In:

Submitted By punitgarud
Words 794
Pages 4
What is the difference between an object and a class?
->Classes and objects are separate but related concepts. Every object belongs to a class and every class contains one or more related objects.

?A Class is static. All of the attributes of a class are fixed before, during, and after the execution of a program. The attributes of a class don't change.

?The class to which an object belongs is also (usually) static. If a particular object belongs to a certain class at the time that it is created then it almost certainly will still belong to that class right up until the time that it is destroyed.

?An Object on the other hand has a limited lifespan. Objects are created and eventually destroyed.
Also during that lifetime, the attributes of the object may undergo significant change.

class and object for same related methods class is nothing but same related to variable to methods.

eg car is a class

maruti santro bolero this is on object A Class is a template. An object is an instance of class. Every data member of an object contains its own value, where as Class only declares the data members.
-------------------------------------------------------------------------------

What is the difference between class and structure?
->Structure: Initially (in C) a structure was used to bundle different type of data types together to perform a particular functionality. But C++ extended the structure to contain functions also. The major difference is that all declarations inside a structure are by default public.

Class: Class is a successor of Structure. By default all the members inside the class are private.
-------------------------------------------------------------------------------

What is encapsulation?
->Packaging an object?s variables within its methods is called encapsulation. itis protective wrapper which prevents the data from being accessed by the code outside the the wrapper, the cose inside the wrapper can be accessed by a well defined interface

ex: class is a protective wrapper which binds data and methods together,they can be aceesed only though well defined interface(i.e object of that class)
---------------------------------------------------------------------------------

Difference between realloc() and free()?
->The free subroutine frees a block of memory previously allocated by the malloc subroutine.
Undefined results occur if the Pointer parameter is not a valid pointer. If the Pointer parameter is a null value, no action will occur. The realloc subroutine changes the size of the block of memory pointed to by the Pointer parameter to the number of bytes specified by the Size parameter and returns a new pointer to the block. The pointer specified by the Pointer parameter must have been created with the malloc, calloc, or realloc subroutines and not been deallocated with the free or realloc subroutines. Undefined results occur if the Pointer parameter is not a valid pointer.

the realloc() function is used to resize memory. where as free() function is used free the memory which is allocated by malloc(),calloc() functions.
---------------------------------------------------------------------------------

What is namespace?
->Namespaces allow us to group a set of global classes, objects and/or functions under a name. To say it somehow, they serve to split the global scope in sub-scopes known as namespaces.

The form to use namespaces is:

namespace identifier { namespace-body }

Where identifier is any valid identifier and namespace-body is the set of classes, objects and functions that are included within the namespace. For example:

namespace general { int a, b; } In this case, a and b are normal variables integrated within the general namespace. In order to access to these variables from outside the namespace we have to use the scope operator ::. For example, to access the previous variables we would have to put:

general::a general::b

The functionality of namespaces is specially useful in case that there is a possibility that a global object or function can have the same name than another one, causing a redefinition error.
-----------------------------------------------------------------------------------

What do you mean by inline function?
->The idea behind inline functions is to insert the code of a called function at the point where the function is called. If done carefully, this can improve the application's performance in exchange for increased compile time and possibly (but not always) an increase in the size of the generated binary executables.

Inline functions are like macros in c language. The functions are expanded in the line where it is invoked at the time of compilation. These functions should not include any loops or static members inside it. And also it shouldn?t be a recursive one. Inline functions should return a value .The advantages are to avoid time wastages , stack and registers operations done during function calls and function invokations. Keyword ?inline? should be included in the function definition.

Example: inline int add(int a,int b)
{
return a+b;
}

void main()
{
int x=5; int y=10;
cout

Similar Documents

Premium Essay

Tax Prepretion

...What's New This Year Publication 5101 All tax preparers, Quality Reviewers, instructors, and Site Coordinators must pass the Intake/Interview and Quality Review test. Income Virtual Currency The IRS announced that convertible virtual currencies, such as Bitcoin, would be treated as property and not as currency, thus creating immediate tax consequences for those using Bitcoins to pay for goods and services. Taxpayers having transactions in virtual currencies are out of scope for the VITA/TCE programs. Standard Deduction The standard deduction for taxpayers who do not itemize deductions on Form 1040, Schedule A, has increased. The standard deduction amounts for 2015 are: * Married Filing Jointly or Qualifying Widow(er) - $12,600 (increase of $200) * Head of Household - $9,250 (increase of $150) * Single or Married Filing Separately - $6,300 (increase of $100) Taxpayers who are 65 and Older or are Blind For 2015, the additional standard deduction for taxpayers who are 65 and older or blind is: * Single or Head of Household - $1,550 (no change) Married taxpayers - $1,250 (increase of $50) Personal ExemptionsThe amount a taxpayer can deduct for each exemption increased to $4,000 for 2015. | Standard Mileage For 2015, the following rates are in effect: * 57.5 cents per mile for business miles driven * 23 cents per mile driven for medical or moving purposes 14 cents per mile driven in service of charitable organizations (no change) ...

Words: 4268 - Pages: 18

Premium Essay

Nmmhg

...skills, personality and employability. AMCAT Employability Report will not only help answer these questions, but will become your guide for deciding next steps on your career path. It will tell you what to study, what interviews to prepare for and how to prepare. Refer to the following tips to understand how to make this report a means to get closer to your dream job. Start by referring to the 'YOUR AMCAT SCORE SUMMARY' chapter of your report. This chapter has all the key highlights for you. You will get to know where you stand nationally in different AMCAT modules, a snapshot of your personality and your employability in different job profiles and sectors. The summary chapter is the key. You should understand everything in it to know where you stand in the job market. For each section in the summary chapter, we mention the chapter having additional information about the section. Wherever you are unable to understand or want more information, refer to the respective chapter. The chapter 'Your Profile and Industry Fitment' is very important. The following tips will help you use it to make an action plan for next few months: a. For profiles where your employability is high, you should start refreshing your knowledge for an interview for them. You may soon get interview calls for these. b. You might find certain profiles where you have high employability, but are not the ones that interest you or you know much about. We will seriously recommend that you explore more about these profiles...

Words: 4442 - Pages: 18

Free Essay

The Interview

...he Pres sentation T Title: The interview. The e Interview is in the thi ird Stage of f the recruit tment Cycle e  The e interview consists of 2 parties:  ndidate   1. Interviewee – Can ployer  2. Interviewer ‐ Emp The e Candidate will have t to prepare f for 3 stages s:  Stag ge 1: preparations bef fore the inte erview  to Start   When t o What are th hey looking g for  Type  o Know the T o What they NEED  ing Information   Gatheri o Study the o organization n  nfo. from Others  o Get Extra in o What they NEED   Preparing  e your stren ngths / weak kness   Analyze  Prepare e your comp petencies: A Adapt your skills as closely to the company’s needs as po ossible   Prepare e for the dif fficult quest tions   What have you lea arned from y your past w work experie ences?  nterviews   Mock in Stag ge 2: Things s to take ca are while pr reforming the interview w   First Im mpression M Matters   Be befo ore time (5 t to 10 minut tes)   Approp priate Dress :Formal , C Comfortable e   Be conf fident   Show yo ou have ma ade effort.   Emphas size the pos sitive sides o of your pers sonality   Use Pow wer words.   Have yo our body lan nguage   Don’t fo orget to be yourself, lo ooking natural and feeling confident is your b best asset  Stag ge 3: How t to close the e interview   How ha as the job va acancy arise en?   How wi ill my performance be measured? ?   Ask Abo out Next Ste eps (Before You Leave the Intervie ew)   Send a T Thank‐you Note Imme ediately Afte er the Interv...

Words: 698 - Pages: 3

Free Essay

Amazon Interview Question for Freshers

...Amazon Interview | Set 1 August 24, 2012 Please find the details of my amazon interviews below. Date of Interviews: 22nd August 2012 No of Rounds: 1 Written + 4 PI Type of Interviews: Campus Interview for freshers Written Test (Time): 90 Minutes 20 Objective Questions: Aptitude and basic C objective problems. 2 Subjective Questions: I.                To find if there is any root to leaf path with specified sum in a binary tree. II.               Some question based on sorting. Interview Round 1(60-70 Minutes): Technical Interview Question 1: Check if a character link list is palindrome or not. Question 2: A sorted array has been rotated r times to the left. Find r in least possible time. Question 3: Clone a singly link list whose nodes contain, apart from next pointers, an extra pointer to any random node. The random pointer of a node N could be after N, before N or the node N itself.   Interview Round 2(50-60 Minutes): Technical Interview Question 1: There is a big file of words which is dynamically changing. We are continuously adding some words into it. How would you keep track of top 10 trending words at each moment? Question 2: Write code for minHeapify() operation. Question 3: Design a data structure for the following operations: I.                Enqueue II.               Dequeue III.              Delete a given number(if it is present in the queue, else do nothing) IV.               isNumberPresent All these operations should take O(1) time. Question 4: Write a function...

Words: 603 - Pages: 3

Premium Essay

Fundamental Analysis of Power Sector

...Content Writer Interview Questions and Tips Planning to take up a fulfilling job as online content writer or taking up writing as a career? Well as with all creative pursuits’ content writing also demands a fair bit of creativity apart from consistent quality. But when you have both, writing can be a fulfilling calling indeed. This small content/copy writing interview guide lists the interview questions common to all jobs apart from focusing on the questions more likely to be asked in any interview for a content or Web copy writer. While I was planning to write a small content writing interview guide for a long time what finally made me put my fingers to the keyboard was the truly vast experience gained after giving 11 interviews in 14 days! Persistence does pay at the end of the day. The Getup: As content writing is a relatively informal job, even an informal getup with a semi-formal shirt should do fine. No need for any tie or suit. Punctuality: This is a must irrespective of the job you apply for. Make sure you reach the venue at least 15-20 minutes before the appointed time and put your documents or reference of past work in order and do remember to have an attractive resume in hand. 1) Tell me something about yourself. This is the most common interview question which will almost certainly be asked to any candidate. While it seems a pretty straightforward question many find it the toughest as it’s quite open ended and people fumble when required to speak...

Words: 3539 - Pages: 15

Premium Essay

Term Paper

...Journal of Forensic & Investigative Accounting Vol. 4, Issue 2, 2012 The Obvious Fraud: A Short, Problem-Based Case Study to Highlight Inappropriate Fraud Examination Techniques David O’Bryan Jeffrey J. Quirin* INTRODUCTION Assume you are an internal auditor for a large, multinational, manufacturing organization with a division in Mexico. One of your responsibilities is to investigate allegations made on the company’s fraud hotline. When you arrive at work one morning you learn an anonymous tip was left on the hotline that alleges fraud involving the division manager. “Pat’s significant other is a fraudulent vendor,” was the anonymous tip left on your company’s fraud hotline. Pat is a division manager at your company. “Wow. I can’t believe this guy is so blatant,” you’re thinking as you review some accounts payable invoices while following up on this anonymous tip. The invoice that caught your attention is shown in Table 1. A quick search of the AP file reveals a total of three invoices like the one in Table 1, all for identical amounts but on different dates. The division manager, Pat, has the authority to approve payment of invoices for less than $10,000. It is obvious to you that the manager has a created a shell company. You happen to know that Pat’s significant other is named Kim, hence the name Kimco Marketing. There is no documentation to support these transactions other than the invoices, all of which are purportedly for marketing services. * The authors are, respectively...

Words: 3900 - Pages: 16

Free Essay

Foreign Service Officer Examination Procedure

...mortality rate is definitely higher in the FSOE. Out of 628 examinees in 2011, only 9 passed. That's 1.4%. I heard there was even a year when no one passed.  I'm one of the lucky 9 who made it. And so to help future examinees prepare for the FSOE, I thought of writing down and sharing my experience. This is my own small way to thank and show appreciation for the people who supported me and helped me make it through.  The exam is difficult because it’s the type of exam which you can’t really study for. The scope covers everything under the sun, and, actually, none of the topics I studied for was asked. The exam proctor told my batch that the best time to review for the FSOE is in college, which is a little bit too late by now, right? So the best tip I can give is simply to make reading a habit. Try committing yourself to read for at least 30 minutes every day and you’ll have a pretty strong fighting chance. What to read? The local news, Inquirer and Star editorials, The Economist, the International Herald Tribune, you get the idea.  Aside from reading, discuss what you’ve read with friends so you’ll develop a deeper appreciation for the material. If your friend isn’t familiar with what you’re talking about, explain it in simple terms. The best way to learn something is to teach it, right? Discussing with...

Words: 2190 - Pages: 9

Premium Essay

Communication Skills

...II. Communicating effectively in a professional environment. A. Suggestions for communication skills in a job interview: B. Suggestions for communication skills in a career fair C. Suggestions for communication skills in the pre-night of an interview D. General tips for communication skills Transition: We should apply different communication skills in different situations to make ourselves be more competitive and outstanding. Besides communication skills, we should also use appropriate body language in a professional manner. Interview strategies: 1. Communication skills 1) Communication skills in a job interview: * Anticipate key questions and respond to the employer’s needs and concern 1. Are you qualified to do the job? 2. Are you motivated to do the job? * Be honest but emphasize the Positive: reframing shortcomings as strengths can shift the employer’s view of you, and also avoiding criticizing others in an employment interview. * Back up you answers with evidence but keep your answers brief 2) Communication skills in career fair and networking events * This is your opportunity to be evaluated on more than just your resume * Begin your introduction by telling the recruiter your name, along with a one-line summation of what you do. * Express your interest and demonstrate that you’ve done your homework by showing more detailed information about the company and the position that you are interested in. * Present the personal...

Words: 506 - Pages: 3

Premium Essay

Interview Tips

...Interview Advice Jon Finkel is the author of The Three Dollar Scholar: Awesome Advice for Acing Life’s Major Decisions and Mindless Debates. He has written for GQ, Men’s Health, ComedyCentral.com, and The New York Times, among other publications. Follow him on Twitter @3dollarscholar. “Think of it as a first date.” “It’s just like dancing with a new partner. Follow their lead.” “It’s a negotiation. Like buying a car.” These are just a few of the worst pieces of advice I’ve ever been given prior to a job interview. I’m sure you’ve heard hundreds of others, and as you know, none of these analogies are correct. A job interview is, simply put, an interview. For a job. Trying to compare it to anything else is a waste of time. Assuming you need a job, there’s nothing like it because no other interaction has, as the major undercurrent throughout your time with another person, the following fact: if you don’t hire me, I can’t pay my bills and provide for myself and my family. That being said, there really is no secret to getting a job if the following things are at play: a) You’re qualified for the position. b) You’re confident that you could do the job. c) You are comfortable talking to strangers. For most people with common sense, ‘a’ and ‘b’ are no-brainers. Maybe you’ll apply for something a little over your head and talk yourself into it, but for the most part, if you’re sitting across from someone doing the hiring, you’re close to worthy of being hired. ‘C’ is...

Words: 1422 - Pages: 6

Free Essay

Taarud

...“ a full and candid account ” Using Special Accommodations and Testimonial Aids to Facilitate the Testimony of Children BOOK 4 Video-recorded Evidence by Alison Cunningham and Pamela Hurley The opinions expressed herein are those of the authors and do not necessarily reflect those of the Department of Justice Canada or the Government of Canada. Alison Cunningham, M.A.(Crim.) Director of Research & Planning Centre for Children & Families in the Justice System Pamela Hurley, M.Ed. Director, Child Witness Project Centre for Children & Families in the Justice System Download copies of all seven handbooks in the series at: www.lfcc.on.ca Disponible également en français sous le titre « Un récit complet et franc » / Recours à des arrangements spéciaux et aux aides au témoignage pour faciliter le témoignage des enfants : Enregistrement vidéo. © 2007 Centre for Children and Families in the Justice System (London Family Court Clinic, Inc.) Library and Archives Canada Cataloguing in Publication Cunningham, Alison J., 1959A full and candid account : using special accommodations and testimonial aids to facilitate the testimony of children / by Alison Cunningham and Pamela Hurley. Includes bibliographical references. Contents: book 1. Overview of issues related to child testimony – book 2. Testimony outside the courtroom – book 3. Witness screens – book 4. Video-recorded evidence – book 5. Designated support person – book 6. Hearsay evidence and children – book 7. Children & teenagers...

Words: 5531 - Pages: 23

Premium Essay

Management of Sofetskill @Campus Placement

...Skills @ Campus Placement ABSTRACT Every student pursuing a professional career in engineering/management or any other stream has an ambition to obtain a challenging job in a company of repute (a brand name) and make a successful career. The eligibility of any student for campus placement although decides on the basis of his current and past academic performance (i.e. 10th and 12th marks) but his success in the interview is mainly depend on the technical knowledge and mostly on presentation / communication skill/general awareness. This implies the importance of soft skill knowledge at this stage. Basic campus placement activities conduct in three phases. 1. Technical or subject Test 2. Group discussion 3. Personal Interview A group discussion or GD conducted to test following skill of the candidates. • Interpersonal skill-listening, speaking, receptiveness, team spirit etc. • Clarity of thoughts-knowledge and ability to link known fact • Communication skill- coherence And the interview process to evaluate the candidate on various aspects such as goal, attitude, and motivational level ability to react the situation etc. This also helps company to assess the cultural fit between the company and students. This paper will elaborate on exact soft skill required for the students who are ready for placement i.e. final or pre final year students of the college based on four important factors, mainly knowledge...

Words: 2717 - Pages: 11

Premium Essay

Case Study on Sore Throut

...Overview of the type of substance abuse issue you are focusing upon, its impact (on society and this agency) and your interest in this agency. (Tip: Open with something shocking or startling which will grab your reader’s attention. Look at some of the articles you have read to get ideas.) II. Agency A. The agency/program you choose to examine and why B. History of the agency/program C. Current data on agency/program: size, number of personnel, service area, mission, etc D. Who you spoke to in the agency/program E. Conclusion you came to after conducting your initial interviews 1. What is the challenge this agency faces in regard to substance abuse? III. Issue you discovered A. Thought provoking discussion of the issue and what problems it causes 1. Challenges for society in general 2. Challenges for the agency/program 3. Challenges for those in the agency/program 4. Possible solutions or ways to address this problem that occurred to you before doing the research IV. Your research A. Articles you examined which relate to this issue B. Findings of those articles C. How you feel these findings relate to your agency/program and their challenges D. Follow-up interview 1. What did your interviewee say about your findings? 2. How might your findings relate to this agency? ...

Words: 361 - Pages: 2

Free Essay

Interview Beating

...Job Interview Success! Copyright © 2006 - by JobInterviewResumeLetters.Com & Accelerated Software Ltd All Rights Reserved; no part of this publication may be reproduced, store in a retrieval system, or transmitted in any form or by any other means, electronic, mechanical, photocopying, recording, or otherwise without prior written permission by JobInterviewResumeLetters.Com or Accelerated Software Ltd from New Zealand. You may however provide this e-book free of charge in its original form to anyone via the internet, website, or other digital material (ie CD). You may also provide this file in its original form without modification as a “Free Bonus” to customers of any of your own products as long as the customer is not buying this e-book. This product is only freely distributed in its original form. www.jobinterviewresumeletters.com TABLE OF CONTENTS 1. Introduction 2. Good Interview Questions 3. Tough Interview Questions 4. Behavioral Interview Question 5. Common Interview Question and Answer 6. Sample Interview Question 7. Good Answers to Interview Questions 8. Good Interview to Ask 9. Job Interview Question and Answer 10. Sample Interview Follow Up Letter 11. Sample Interview Thank You Letter 12. Free Job Interview Question 13. Questions to Ask During An Interview 14. Free Job Interview Tip 15. Job Interview Help 16. Job Interview Weaknesses 17. Interview Questions to Ask 18. Job Interview Dos and Don’ts 19. What to Wear to a Job Interview 20. Free Job Interview Tip Introduction...

Words: 10219 - Pages: 41

Free Essay

Interview of Passion

...Interview of Passion Sidra Jabeen Speech 100 Professor Ruff The Interview of passion Specific Purpose: To inform my audience about the first impression, how to be organized and the last impression. I. Introduction A. We say first impression counts, but last impression is what put the icing on the cake. B. I would like to give you a brief overview of the first impression, how to be organized and the last impression of the interview of passion. C. My name is Sidra Jabeen. Intrigued by the subject, I have read dozens of newspaper and magazine articles about this subject. D. The benefits are that it allows you to be your true self all of the time, it gives you energy instead of draining you, and it enables you to align with your passion and Do What You Love...!!! II. Body A. We'll start with First impression 1. As the saying goes, "Smile and the world smiles too." So there's nothing like a smile to create a good first impression. 2. First impression is the effect or influence that something or someone has on a person's thoughts or feelings 3. It takes just a quick glance, maybe three seconds, for someone to evaluate you when you meet for the first time. In this short time, the other person forms an opinion about you based on your appearance, your body language, your attitude, your mannerisms, and how you are dressed. 4. Do not panic, have a breath-in, breath-out moment for yourself, relax yourself, remind yourself that you can...

Words: 678 - Pages: 3

Premium Essay

Eschatology

...A. Introduction Eschatology is a Christian Doctrine that refers to the end times of the universe as in general or death of a person as singular. The diverse cultures therein the Melanesian realm also employs diverse philosophies of life in relation to death and related aspects to it. This work seeks to identify a cultural model to compare and contrast with the Christian Doctrine of Eschatology, one that could be useful to explain eschatology to its relevant congregation. It is a wide topic of discussion which does not fall within the scope of this work. It will only present an overview of the Christian Doctrine and my traditional culture of North Pentecost. This is to clarify why it could be possible to use that cultural model to explain eschatology to its relevant congregation. Therefore it will elaborate on these viewpoints; * What is Eschatology * Pentecost Model * Life * Environment/Space * Comparison and Contrast * Similarities * Differences * Reason why it is a possible model A. What is Eschatology Eschatology means the science or teachings concerning the last things derive from the Greek word eschatos which means last and eschata which means the last things. It is a study that specifically concerns with the end times. What it is to come at the end of one’s life or the destiny of humanity. Therefore, Christianity views history or time as linear not cyclical. At the very early stage of Christian community, they interpreted it as...

Words: 1630 - Pages: 7