Preview

c++ balaguruswamy

Better Essays
Open Document
Open Document
1703 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
c++ balaguruswamy
Top of Form

Technical Interview Questions

Google Search

C++ Interview Questions
C# Interview Questions
C Interview Questions
.........More

pub-7003540323

ISO-8859-1

active

GALT:#008000;G

C ++ Aptitude Questions
C Aptitude Questions 2
.........More

3422992112

ISO-8859-1

Aptitude Interview Questions

1

en
Bottom of Form

Tutorials

C Tutorial
C++ Tutorial

C Aptitude Questions and Answers
.........More

Programming Source Codes

C/C++ Source Codes
C# Source Codes
.........More
Soft Skills

Communication Skills
Leadership Skills
.........More
Top of Form

1470006299 techpreparation http://techprepara
Interview

1

from

0

Subscribe to our Newsletters
Name:
Email:
Join Now !
Bottom of Form

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 to change 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

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Balash

    • 881 Words
    • 3 Pages

    1. Which of the forces for change are causing SAP to undertake major organizational change? Explain.…

    • 881 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Balanchine's Prodigal Son

    • 734 Words
    • 3 Pages

    I was not familiar with this ballet at all although I have enjoyed Prokofiev’s music when watching Romeo and Juliet. It is not a long piece to watch and the dancing although slow in parts (when the Siren is doing her solo and the Pas de Deux) it is always interesting to watch. The principle male has to really be able to act and portray lots of different emotions – it’s not all about the dancing for this character. I thought for the time it was created quite a contemporary piece which fitted the music.…

    • 734 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Piggy's Symbols

    • 865 Words
    • 4 Pages

    Military theorist Carl von Clausewitz once said: “Savage peoples are ruled by passion, civilized peoples by the mind. The difference lies not in the respective natures of savagery and civilization, but in the attendant circumstances, institutions, and so forth... even the most civilized peoples… can be fired with passionate hatred for each other.” In Lord of the Flies, by William Golding, the boys on the island slowly lose sight of their humanity, becoming more and more savage as the days progress. William Golding illustrates the darker side of mankind and shows how quickly man can turn evil when left to his own devices. Within days of being on the island the…

    • 865 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Hammurabi's Code Analysis

    • 1017 Words
    • 5 Pages

    These letters and managerial works, (for example, mandates for the building of channels, sustenance dissemination, beautification and building undertakings, and lawful issues) bolster the perspective, which Hammurabi held of himself. His popular law code is not the first such code ever (however it is regularly called so) yet is surely the most well known from classical times before the code set down in the scriptural books. The Code of Ur-Nammu (c. 2100-2050 BCE), which started with either Ur-Nammu or his child Shulgi of Ur, is the most established code of laws on the planet. Hammurabi's code varied from the prior laws in huge ways. The Code of Ur-Nammu positively depends on the idea of "joint individuals from the same family" in that a fundamental comprehension by the general population of legitimate conduct in the public eye is expected all through.…

    • 1017 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    Symbol Project

    • 809 Words
    • 3 Pages

    A normal person who would look at my symbol and say, “He picked it because…

    • 809 Words
    • 3 Pages
    Satisfactory Essays
  • Better Essays

    Evil Operator

    • 1578 Words
    • 7 Pages

    Prankdial.com is a website that offers a wide array of services to its users. It includes applications such as Fake Caller ID, the Ring Prank, Auto Breakup, and many others. Among the most controversial of its services is Evil Operator. This program can be accessed and used by anyone in the world. The idea of the idea of making a prank phone call through the internet has had wide appeal. The program allows you to enter in two different telephone numbers into the site. Before you click the “Send Call” button, you have two options. The first option explains “I would like to record this conversation. I agree to notify the caller they are being recorded” and the second mandatory option states “I agree to the Terms of Service.” Let’s face it, what’s the sense in making a prank call if you can’t hear it, so you click both options and hit the “Send Call” button. You are prompted to the next page that tells us that your “Current Status: Connecting Your Victims.” Each of your victims receives a phone call and on their respective caller ID’s, Person 1 would receive and incoming call from Person 2 and Person 2 would receive an incoming call from Person 1. Of course, this process doesn’t work every time; however, when it does the “evil operator” receives a link to the phone call’s recording. “Evil operators” are given one call per day using the application, however, one can purchase more calls if they so choose to do so. It is my argument that although this website is legal through its instructed terms of services, I believe that it promotes an atmosphere of misuse and is fundamentally unjust and illegal.…

    • 1578 Words
    • 7 Pages
    Better Essays
  • Satisfactory Essays

    The circle poem starts with the word costume because if it wasn’t for the ham costume Scout wore, she could have died. The wires that held the ham costume up prevented Bob Ewell from stabbing Scout. After costume and ham, meat was next because ham is a meat and you chop meat with a knife. Bob Ewell had a knife on that night which he meant to use to kill Scout and Jem for revenge against Atticus, but his scenario backfired him and he ended up dead. The event of Ewell’s death left many secrets hidden and one can only guess with happened that night. Who killed Bob Ewell? Or did he from his own clumsiness? Those secrets will be hidden forever and may be a disguise for other worse secrets, which then leads back to costume because a costume is a…

    • 143 Words
    • 1 Page
    Satisfactory Essays
  • Good Essays

    Manda Bala

    • 911 Words
    • 4 Pages

    The situation in Brazil is exactly that of Karl Marx’s theory of The Bourgeoisie and the Proletariat (money and power). Marx examined class conflict within an economic context, between the bourgeoisie and the proletariat, and predicted that the exploration of the working class would lead to a conflict between the classes. Where a person fits in these groups defines his or her social status, and therefore his or her opportunities within the society. The bourgeoisie are the higher class people, members of the property owning class; people who own the means of production. People that can be related to this class of people from the movie would be like Jader and Mr. M. Marx believed that the bourgeoisie exploited the working class and oppressed tem through the mechanism of capitalism; an economic system where the means of production is privately owned and profit is earned in competitive conditions. Marx argued that social institutions like governments or legal systems are tools used by the ruling class to keep the subject class under control while members of the higher class further their personal agendas between the proletariats; the poorest class of people, the lower working class who sell their skills for money.…

    • 911 Words
    • 4 Pages
    Good Essays
  • Good Essays

    In my Mandala I chose to do the symbols I did because they all matched and described what each belief was. To represent Brahman I chose a picture of Brahman looking down on a women working because it represents how he is the Supreme power of the universe and how he watches over the people. The next symbol, represents Deities and shows a picture of a lightning and thunderstorm because thunder and lighting goes together, and the god of thunder used lighting as weapons and is loud, fierce, and warlike. I chose a picture of a woman harvesting crops to represent Dharma because it means to perform one’s duties and the women is doing her dharma. The symbol with a woman closing her eyes and remembering her good deeds best represents karma because by…

    • 669 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Ozymandius

    • 740 Words
    • 3 Pages

    A friendly sonnet-writing competition between two 19th century poets, Percy Bysshe Shelley and Horace Smith, led to two Ozymandius poems that continue to be talked about and analyzed to this day. Each sonnet was published by Leigh Hunt early in 1818 in consecutive issues of his monthly journal, The Examiner (Rumens, 2010). Even though the sonnet written by Smith has taken a back seat to Shelley in scholarly study, both poems explore the opulence of ancient history and the inevitable consequences of time.…

    • 740 Words
    • 3 Pages
    Good Essays
  • Best Essays

    Mr Burak Ceylan

    • 2842 Words
    • 12 Pages

    There are many new and revolutionary ways of marketing a product or service to consumers.…

    • 2842 Words
    • 12 Pages
    Best Essays
  • Good Essays

    Leunig's Cartoon Analysis

    • 1388 Words
    • 6 Pages

    There are strong, hidden messages evident in the cartoon being analysed that can be interpreted in many ways by members of different religious backgrounds. A possible interpretation of Leunig’s cartoon could be that after the person had created such a big, extravagant cage, he starts to feel a sense of loneliness and realises that the simple cage that he once had was enough for him. The man acted upon his desire which blinded him from seeing the perfect cage and only when he was trapped by his own actions did he realising that there was no need for the big, extravagant cage from the dream to feel satisfied for what he had. This interpretation of the cartoon can be related back to how a Buddhist would view the stimulus regarding their beliefs.…

    • 1388 Words
    • 6 Pages
    Good Essays
  • Good Essays

    Lub Dub: A Short Story

    • 476 Words
    • 2 Pages

    Echoing in my ears, a peal indicates it is my turn to take on the ride of terror.…

    • 476 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    Olimpiad

    • 600 Words
    • 2 Pages

    To start with, I want to enjoy life to its fullest, which means I wish I could have an interesting job that would help me to realize myself but at the same time it must be a well-paid job because I want to make sure that I will have enough money to travel, to acquire a good house, to provide financial needs of my family. I must think now how I will afford it. As Samuel Jones said, ‘A future is purchased by the present.’ I have to work out a plan of my future actions, to achieve my ambitious objectives about my education, and career. To my mind it's good idea to plan your future to realize all your dreams. I hope I will have a job which I am interested in because only then I could enjoy my life. To my mind you will never feel bored if you have an occupation which is exciting to do.…

    • 600 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    Manusia lemah

    • 878 Words
    • 4 Pages

    The case states that the portion of COGS related to ingredients, packaging, and storage are the same across segments. Therefore, these costs are allocated equally to all cases:…

    • 878 Words
    • 4 Pages
    Powerful Essays