x

Wednesday, January 27, 2016

What is the role of C plus plus today?

What is the role of C plus plus today?

C++ is a general-purpose programming language. It has imperative, object-orientedand generic programming features, while also providing facilities for low-level memory manipulation. Since the 1990s, C ++ has become one of the common commercial language in the meantime.

It was designed with a bias toward system programming and embedded, resource-constrained and large systems, with performance, efficiency and flexibility of use as its design highlights.

If you want to get into programming, C++ is definitely an important language to learn. C++ is not exactly an easy language to learn.  I’m pretty sure unless you have worked with some other programming language before.

C++ remains one of the most predominant languages for writing embedded systems software. C++ is used to create computer programs! Anything from art applications, music players and even video games. Yes, many video games have been made in C++.

– Many defense contractors, especially when dealing with hardware, use C++. Many makers of advanced medical equipment (e.g., MRIs) use C++. Most packaged software is still written in C++.

-There is work out there for C++ developers: Numerical computations: physics, graphical games, finance, statistics;Bit fiddling: drivers, operating systems, networking, embedded devices; Anywhere you need exact control of allocation of memory.

– C++ is also used heavily in real-time financial market data software.

– C++ is still used extensively for performance intensive tasks. For example, work with video compression and decompression.

*A brief off-the-top-of-my-head listing of projects that use C++

– Operating systems

– Interpretting engines of other languages

– Engines for databases, games high performance computing

– Applications

– Device driver development

– Games

– Advanced engines (audio, image processing, etc)

– Telecom

– Embedded software (devices and such)

– Several major operating systems have been written in c++

– Much numerical, scientific, and engineering computation is done in C++.

– Graphics and user interfaces

– C++ is widely used for teaching and research

– Games

– Analysis of Integrated-circuit simulation results.

– Medical Software

– Anti-Virus Software

– Real-Time Physical Simulations

– High performance image processing/AI software

– High performance aerial and mobile sensor processing

– C++ compilers- MSVC, Clang, ICC

 may be more of it, but this should be the top

*Here is a list of systems, applications, and libraries that are completely or mostly written in C++. that might give a novice an idea what is being done with C++

– Adobe Systems: Photoshop ,Illustrator,Acrobat

– Autodesk: A large number of major number of application in the CAD domain.

– Google:  Google file system and Google Chromium

– Mozilla: Internet browser Firefox and email client Thunderbird

– Alias System – Autodesk Maya: Maya 3D software

– Bloomberg: Providing real-time financial information to investors

– Microsoft:  Windows 95, 98, Me, 200 and XP

– NASA: Lots of projects, including

– Games: Doom III engine. Sierra On-line: Birthright, Hellfire; Blizzard: StarCraft, Diablo II: Lord of Destruction, Warcraft III, World of Warcraft; Microsoft: all games. EA: video game engine.

– MySQL: MySQL Server (about 250,000 lines of C++) and MySQL Cluster.

Leave a Reply

Programming books classics that programmers should read

Programming books classics that programmers should read

These are the books which can change your career, can make you better programmer. These books are more about a way of thinking, organizing, and becoming better at the craft of software engineering. They won’t make you better at any particular programming language but they will help you to become a better Programmer.

1. Code Complete 2 – Steve McConnell

1

Steve McConnell’s Code Complete is absolutely essential to every software developer. The lessons contained in Code Complete are based on solid, time-tested principles. The time spent reading Code Complete is time spent bettering your career as a developer.

2. Advanced Linux Programming – CodeSourcery LLC , Mark L. Mitchell, Alex Samuel, Jeffrey Oldham

2

Advanced Linux Programming is divided into two parts. The first covers generic UNIX system services, but with a particular eye towards Linux specific information. This portion of the book will be of use even to advanced programmers who have worked with other Linux systems since it will cover Linux specific details and differences. For programmers without UNIX experience, it will be even more valuable. The second section covers material that is entirely Linux specific. These are truly advanced topics, and are the techniques that the gurus use to build great applications. While this book will focus mostly on the Application Programming Interface (API) provided by the Linux kernel and the C library, a preliminary introduction to the development tools available will allow all who purchase the book to make immediate use of Linux.

3. The Mythical Man-Month: Essays on Software Engineering, Anniversary Edition (2nd Edition)

3

I have read it as part of my PhD, since it’s part of the classical books of software engineering. Yet the book tackles very important issues not only about management but how people interact during software development. I’ve recognised myself in many situations described by the author (even that I’m not part of a software development team).
One might wonder, as I did, how many of the concepts explained by the author apply to current technology of the 21st century, but the author tackles that in the last chapters. However, almost everything applies, because the book focus are the general lessons that never get outdated

4. C# Yellow Book – Rob Miles

4

It is a very useful book to start with C# language and object-oriented programming. The book explains the theory and concepts in a meaningful and fun way while offers tips for best practices. I highly recommend it, it’s a must read.

5. Clean Code: A Handbook of Agile Software Craftsmanship

This book makes some very good points, sometimes taking them to extreme (“Never write functions longer than 15 lines! Never write functions with more than three arguments!”). Some of these points were quite new and useful for me – YMMV. It’s too Java-specific in a few places, and reading the last refactoring chapter on a kindle was quite a challenge, but otherwise it was well worth a read. At least I got a clear picture of how I want to refactor a big piece of my current project after reading this.

6. Don’t Make Me Think: A Common Sense Approach to Web Usability

6

This book is great for mobile and web design and development principles. I recommend this book to beginners and seasoned individuals. I still read this book just to refresh my memory.

7. Core HTML5 Canvas: Graphics, Animation, and Game Development (Core Series) –David Geary

7

Core HTML5 Canvas: Graphics, Animation, and Game Development is a terrific guide to building HTML5 games using the Canvas object… It is a beautifully-presented guide to drawing using the Canvas object, with a focus on game development.

8. C++ GUI Programming With Qt 3 – Jasmin Blanchette vĂ  Mark Summerfield

8

This book provides all the information needed to become a professional Qt developer. The book also covers cross platform GUI programming–programmers can be working on Windows, Linux, or Mac and the book will work for them. This is useful for commercial companies that use Qt, and for companies that are evaluating Qt. It will also be valuable to the vast number of open source developers who already use Qt since no other book of comparable quality or comprehensiveness is available. This book teaches Qt’s idioms and how to use Qt to best advantage.

9. JavaScript: The Good Parts – Douglas Crockford

9

This is a must-read book if you use Javascript seriously. When I put the book down, I’d learned and understood a few critical ideas about using Javascript that are changing the way I program. In particular, I found the section related to object creation (prototypal inheritance, implications for using the new keywords, etc.) I also greatly enjoyed the appendices — I eat up lists like the awful and bad parts of Javascript, and the introduction to JSLint is going to be very fruitful. Not everything in the book was new to me, but what was more than justified reading this once and then reading it again.

10. The Design of Everyday Things – Donald A Norman

10

Excellent piece of non-fiction. This book is a prescribed textbook for a course on computer interface design that I’m doing. Once I really started reading it, I almost couldn’t put it down – it was so interesting that it almost read like fiction – none of the dry dust usually found in conventional textbooks. Very well and humorously presented, and a must for engineers, designers, manufacturers and inventors everywhere!

interviewquiz.net

One Response to Programming books classics that programmers should read

  1. […] way to learn programming in general and Visual Basic in particular. That’s why you need those books as references. Whether you are a beginner or an advanced developer. Besides, With these books you gain the […]

Leave a Reply

Top 99 interview questions and answers for C++| Part 3

Top 99 interview questions and answers for C++| Part 3

9788177228045

These C++ Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of C++.

Top 99 interview questions and answers for C++

67.

What is the default function call method?

By default the functions are called by value.

68.

What is the maximum length of an identifier?

Ideally it is 32 characters and also implementation dependent.

69.

What is the first string in the argument vector w.r.t command line arguments?

Program name.

70.

What is recursion?

Function calling itself is called as recursion.

71.

What are valid operations on pointers?

The only two permitted operations on pointers are

  • Comparision ii) Addition/Substraction (excluding void pointers)

72.

How can we refer to the global variable if the local and the global variable names are same?

We can apply scope resolution operator (::) to the for the scope of global variable.

73.

Which operator can be used to determine the size of a data type/class or variable/object?

sizeof

74.

Who designed C++ programming language?

Bjarne Stroustrup.

75.

Can we resize the allocated memory which was allocated using ‘new’ operator?

No, there is no such provision available.

76.

Which compiler switch to be used for compiling the programs using math library with g++ compiler?

Opiton –lm to be used as > g++ –lm <file.cpp>

77.

What is reminder for 5.0 % 2?

Error, It is invalid that either of the operands for the modulus operator (%) is a real number.

78.

What are the different ways of passing parameters to the functions? Which to use when?

Call by value: We send only values to the function as parameters. We choose this if we do not want the actual parameters to be modified with formal parameters but just used.

(more…)

79.

What are command line arguments?

The arguments which we pass to the main() function while executing the program are called as command line arguments. The parameters are always strings held in the second argument (below in args) of the function which is array of character pointers. First argument represents the count of arguments (below in count) and updated automatically by operating system. (more…)

80.

What is a friend class?

A class members can gain accessibility over other class member by placing the class declaration prefixed with the keyword ‘friend’ in the destination class.

81.

What is the order of objects destroyed in the memory?

The objects are destroyed in the reverse order of their creation.

82.

What is a virtual destructor?

A virtual destructor ensures that the objects resources are released in the reverse order of the object being constructed w.r.t inherited object.

83.

Can we nest multi line comments in a C++ code?

No, we cannot.

84.

What is the purpose of #undef preprocessor?

It will be used to undefine an existing macro definition.

85.

Is 068 a valid octal number?

No, it contains invalid octal digits.

86.

Which key word is used to perform unconditional branching?

goto.

87.

What is the difference between variable declaration and variable definition?

Declaration associates type to the variable whereas definition gives the value to the variable.

88.

What is the difference between actual and formal parameters?

The parameters sent to the function at calling end are called as actual parameters while at the receiving of the function definition called as formal parameters.

89.

S++ or S=S+1, which can be recommended to increment the value by 1 and why?

S++, as it is single machine instruction (INC) internally.

90.

What is difference between including the header file with-in angular braces <> and double quotes “ “

If a header file is included with in < > then the compiler searches for the particular header file only with in the built in include path. If a header file is included with in “ “, then the compiler searches for the particular header file first in the current working directory, if not found then in the built in include path

91.

If a pointer declared for a class, which operator can be used to access its class members?

Arrow (->) operator can be used for the same

92.

What is the use of the keyword ‘using’?

It is used to specify the namespace being used in.

93.

What is ‘cin’?

cin is the object of istream class. The stream ‘cin’ is by default connected to console input device.

94.

What is ‘cout’?

cout is the object of ostream class. The stream ‘cout’ is by default connected to console output device.

95.

What is the full form of STL?

Standard template library

96.

What is ‘std’?

Default namespace defined by C++.

97.

Can we create and empty class? If so what would be the size of such object.

We can create an empty class and the object size will be 1.

98.

Are class functions taken into consideration as part of the object size?

No, only the class member variables determines the size of the respective class object.

99.

Which function is used to move the stream pointer for the purpose of reading data from stream?

seekg()

interviewquiz.net

Leave a Reply

Top 99 interview questions and answers for C++| Part 2

Top 99 interview questions and answers for C++| Part 2

C-Interview-Questions-and-Answers-300x204These C++ Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of C++.

Top 99 interview questions and answers for C++| Part 2

34.

What is operator overloading?

Defining a new job for the existing operator w.r.t the class objects is called as operator overloading.

35.

What is function overloading?

Defining several functions with the same name with unique list of parameters is called as function overloading.

36.

What is the data type to store the Boolean value?

bool, is the new primitive data type introduced in C++ language.

37.

Can we initialize a class/structure member variable as soon as the same is defined?

No, Defining a class/structure is just a type definition and will not allocated memory for the same.

38.

What are/is the operator/operators used to access the class members?

Dot (.) and Arrow ( -> )

39.

Name the data type which can be used to store wide characters in C++

wchar_t

40.

What is a preprocessor?

Preprocessor is a directive to the compiler to perform certain things before the actual compilation process begins.

41.

What is a token?

A C++ program consists of various tokens and a token is either a keyword, an identifier, a constant, a string literal, or a symbol.

42.

What is a container class?

A class containing at least one member variable of another class type in it is called so.

43.

Where an automatic variable is stored?

Every local variable by default being an auto variable is stored in stack memory

44.

Can a program be compiled without main() function?

Yes, it can be but cannot be executed, as the execution requires main() function definition.

(more…)

45.

When should we use the register storage specifier?

If a variable is used most frequently then it should be declared using register storage specifier, then possibly the compiler gives CPU register for its storage to speed up the look up of the variable.

46.

What is the meaning of base address of the array?

The starting address of the array is called as the base address of the array.

47.

What is the purpose of extern storage specifier.

Used to resolve the scope of global symbol

48.

What is a static variable?

A static local variables retains its value between the function call and the default value is 0. The following function will print 1 2 3 if called thrice. (more…)

49.

What is keyword auto for?

By default every local variable of the function is automatic (auto). In the below function both the variables ‘i’ and ‘j’ are automatic variables. (more…)

50.

How can we catch all kind of exceptions in a single catch block?

The catch block with ellipses as follows

51.

What is a class template?

A template class is a generic class. The keyword template can be used to define a class template.

52.

What are command line arguments?

The arguments/parameters which are sent to the main() function while executing from the command line/console are called so. All the arguments sent are the strings only.

53.

What is a namespace?

A namespace is the logical division of the code which can be used to resolve the name conflict of the identifiers by placing them under different name space.

54.

What is the scope resolution operator?

The scope resolution operator is used to

  • Resolve the scope of global variables.
  • To associate function definition to a class if the function is defined outside the class.

55.

What is the role of the file opening mode ios::trunk?

If the file already exists, its content will be truncated before opening the file.

56.

What is the block scope variable in C++?

A variable whose scope is applicable only within a block is said so. Also a variable in C++ can be declared anywhere within the block.

57.

Can we implement all the concepts of OOPS using the keyword struct?

Yes.

58.

What is the difference between the keywords struct and class in C++?

By default the members of struct are public and by default the members of the class are private.

59.

Explain the pointer – this.

This, is the pointer variable of the compiler which always holds the current active object’s address.

60.

What is function overriding?

Defining the functions within the base and derived class with the same signature and name where the base class’s function is virtual.

61.

Are the exceptions and error same?

No, exceptions can be handled whereas program cannot resolve errors.

62.

What happens if an exception is thrown outside a try block?

The program shall quit abruptly.

63.

Is it legal to assign a base class object to a derived class pointer?

No, it will be error as the compiler fails to do conversion.

64.

Does an abstract class in C++ need to hold all pure virtual functions?

Not necessarily, a class having at least one pure virtual function is abstract class too.

65.

What is the difference between delete and delete[]?

Delete[] is used to release the array allocated memory which was allocated using new[] and delete is used to release one chunk of memory which was allocated using new.

66.

What are available mode of inheritance to inherit one class from another?

Public, private & protected

interviewquiz.net

 

Leave a Reply