Friday, May 8, 2015

Basics of Pointers

Part - 1



Part - 2


Basics of Pointers

Some C++ tasks are performed more easily with pointers, and other C++ tasks, such as dynamic memory allocation, cannot be performed without them.

As you know every variable is a memory location and every memory location has its address defined which can be accessed using ampersand (&) operator which denotes an address in memory.

Consider we have a statement int a;  

"&" indicates the address so, "&a" indicates the address of a.

For statement int* a;  or  int *a;  : It declares a pointer. So we have created a memory allocation for storing an address to variable "a". The variable "a" can only contain an integer reference i.e. address of an integer.

So a = address of integer

and *a points to the value that is stored at address of "a".

Also pointers are used to indicate the start of array.

Object Codes and Reusability of codes



Generating Object Codes

An object file is a file containing object code, meaning relocatable format machine code that is usually not directly executable. There are various formats for object files, and the same object code can be packaged in different object files. An object file also works like an Application Extension (.dll).

For gcc and g++, "-c" is the compile flag. It only compiles the code and doesn't do the linking operation. Hence we get the object code which can be ".o" file. 

gcc -c <filename>     or   g++ -c <filename>   generates a object file with same filename and ".o" extension

Now further this files can be connected with the source and hence an entire module is compiled. The object code supports the abstraction problems where multiple units of solution combines to form the entire solution.

Getting Started with GNU Compilers


GCC : GNU Compiler Collection.

The compilers are mostly used for C and C++ Application development. In industry this compiler collection is widely used for developing applications.

You can get the GCC Compiler installed on various systems as : 
  • on linux (debian based) : sudo apt-get install g++-4.9
Also if you have anything more to know see here.
  • on linux (rpm based) : sudo yum install gcc-c++
  • for other linux systems get the tar ball and compile and install : 
    • get the tarball from here for gcc c and c++ by selecting the latest version available and follow the instruction as stated.
  • for windows the gcc and g++ can be installed without any hazzles by getting it with CodeBlocks
  • for mac systems if you have XCode you're already setup else read this.
After installing restart the terminal and check for the commands "gcc -v" and "g++ -v". 
If it responds correctly the install is success else you need to troubleshoot.

Thursday, April 30, 2015

Simple and Common Problems in Java







Very simple problems that must be at your fingertips when solving or appearing for any java programming interview rounds... :)

Tuesday, January 13, 2015

What is it like to work at "TCS"?

Answer by Suyash Joshi :
The answer varies depending on your project and project managers. There is sufficient amount of no-brains work kind of projects. There are a few technically challenging projects requiring long hours. There are projects where onsite opportunities are greater. And then there is also the Bench. 
Life is generally ok if you are in an average, regular hours project. Depending on your office, you may have lots of facilities for extra-curricular stuff like office clubs, sports, canteen with good variety of food, and all that jazz.

Also adding to above answer by Rajesh Wasave, (Assistant System Engineer at TCS-India) : 
Its cool actually...no work for at least a year...play caroms...play cricket...play this..play that...follow your hobby...follow your girlfriends...follow this...follow that...its life man...damn enjoyable...!!
P.S. things vary catastrophically after you get into a project.

And finally a "one liner" answer here from Sri Harsha Narasimha : 
U'll feel like a dumb ass every single day no matter how good you are.


What is it like to work at "Infosys"?

As a fresher in Infosys, everyday some session is organized..pick your interest of technology and attend classes/virtual classrooms.Try to learn..as much as you can..sharpen your skills.Make use of this time to make yourself a valuable resource..

Also says Akshay Kr GuptaAn IT Professional : 

There are few things which you can't explain in words. Working in Infosys is also something like that. Let me try to explain my life in Infosys.
Officially the office starts at 9.00 AM and as per the policy you must spend 9 hours 30 minutes in office daily.

But in my case there is no fix working hour, many times i worked here for more then 24 hours continuously. Many nights i spend in front of my PC without complaining. Many times i had to come office in mid night to fix some crucial issues.
My this work schedule looks very tough but personally i never had any problem with my schedule. I always work very happily.

Actually your life in Infosys very much depends upon your managers. I am lucky to have some very good managers here. When i have no work then I don't come to office. No body asks any question to me.
Many times I reached office after lunch and left for home before 5.00 PM.

People say it is unstable life style, but i enjoy it.
I have responsibilities and authorities in Infosys; I don't think that any other IT company can give me this much responsibilities and authorities.

But again I would say that your life in Infosys totally depends upon your manager; some can make your life very easy  and some can make your life hell here.

What is it like to work at "Ubisoft"?

Answer by Taner Baubec : 

To be short, I think it's great. I'm a game designer at Ubisoft.
People are great, very passionate about all sorts of things.
You can travel quite a lot lately, depending on the project you're working on because you collaborate a lot with teams from other countries. So far I've been to France 8 times, attended last E3 in LA.
There's a nice company culture, a lot of internal events, funny contests.
I believe people are a lot more respected than in other big game companies. The stories I've heard from people working there... nightmares!
You develop a lot no matter what branch you are part of.
A lot of funny stuff, and there are never hard feelings.
Personal freedom and flexibility are great. You can come in late if you have to run an errand or something, there's no crankyness about that if you recover those hours some other time. Also you get a lot of support if you want to change your career path. You can also work in other Ubisoft studios around the world.
Overall, I love it! I feel we're making games in a very fun way.


------------------------------------------------

In general it's a gaming company so you have to do lots of programming and testing. Though if gaming is your passion then it's bliss for you being a tester here. While as a developer you have to stay prepared to work for longer hours coding and coding and coding....!! Work environment is great with great flexibility but endorsed with tight and high responsibilities! And not forget to mention the low and static salaries but if you're looking out for cool working environment and job satisfaction... Here's the place!