Latest Entries »

1st round: GSAT (consists of Data interpretation, aptitute(only 5 questions) and analytical reasoning). This paper was similar to SISC GSAT paper, unfortunately didnt remember the questions.

2nd round: It comprised of questions from C,C++, DS and OS

some of the questions were:

Q1)which of the following is not a scheduling algorithm

a)FIFO

b)Priority

c)shortest remaining first

d)Last in first out

ans: d

Q2)Which is not a fiile system

a)FAT..

b)NTFS

c)EXT2

d)EXT5

ans: d

Q3 pick the correct one

a)in 32 bit ram is 4GB nd in 64 bit is 16 GB

b)

c)

d)

ans:

Q4)TLB is associated with

a)CPU

B)paging

c)Caching

D)all

ans: b

Q5 which does not make processors

a)intel

b)apple

c)arm

d)SEL

ans: b

Q.1if you want to add a new element but there is no available space then it is called

a)underflow

b)overflow

c)

d)

ans: b

Q.2Given a simple B.S.T,you have to write its inorder,preorder and postorder traversal

Q3.In a heap

a)root is the greatest

b)parent is always greater than both of its children.

c)both a nd b

d)none

ans: b

Q4)time complexity of mergesort is

a)O(logn)

b)O(nlogn)

c)O(n^2)

d)O(n)

ans: b

Q5)Running time of n(n+1)/2 will be

a)O(n)

b)O(n^2)

c)

d)

ans: b

In c/C++ section questions were from pure virtual functions, difference between  overloading and overriding, abstract classes, default access in class and structure, inheritance etc.

3rd round: Algorithm round (All the shortlisting of candidates were done in the 1st two rounds, there was no elimination in this round)

2 questions were given:

1. Solving the tic tac toe puzzle, to write a program and or pseudo-code, or explain using flowchart. the HR gave us hints to solve it using automata theory, or min-max algorithm, or soft computing or AI anything that we wanted.

2. Given a string, say “SAMSUNG SOFTWARE”, print it in reverse manner eliminating the repeated characters. the program should be optimised in  terms of time complexity, space complexity, power complexity and lines of code. It should not be a two step program, i.e. first reversing and then eliminating. The interviewer was asking something in terms of O(n) or even less than that.

4th round: Technical Interview

Tell me about yourself.

He asked me about my training, it was on android. He started asking me questions on android.

What is an adapter in android? what is activity how does it actually communicate??

I started explaining him and then he asked me ” are you comfortable with android or i should switch( “thank god he asked that” )

i immediately replied “sir, i am comfortable with c, c++”

then he started asking me questions on storage classes. What are storage classes? define them. where are they stored? what is data section and code section. then he gave me  to explain:

global static int i;

extern int i;  what is their visibility and scope. can i reinitialise them, can i access them from other files, he kept turning and twisting for around 10 minutes on these questions. Then he asked me

const char *p;

char const *p;

char *const p;

const char const *p;

what did they mean and then he gave me a c question to tell me the output. const was being incremented there so it was a compiler error.

Then he asked me to write a program  to print 1 to x given x as input without using any loops.  I did it using recursion.

next, are you familiar with semaphore and mutex? what is it? and which one u think is better?

can you write a program to reverse a linked list. I used three pointers in my program he then asked me have you done this program earlier?

i told him ” ya, its fun doing them… :P

then he told me to write a program for bit setting. Did it…

what is virtual memory and how is it implemented? and kept on circling around for quite some time asking different questions related to paging.

few questions were about allocation of memory and caches.

My interview went on for about 40-45 minutes. After that i was called for the HR round

5th round:  He picked out my algorithm round paper and started asking me about the questions. how can it be optimized more.

then he asked ” u had 2 days, must have gone through the solution that i provided for my interview”

i told him ” yes sir”, and then i elaborated the answer. Then he asked “what is memory leak and what is segmentation fault”

“why is segmentation fault so named?”

“how is page stored at disk level?”

He wasn’t satisfied with any of my answers. and kept twisting around all my answers. :-P

then he asked me “you have mentioned 100% in +2 mathmatics in ur cv so here is my next question,

what is 97X103

i told him the answer quickly. Then he asked me ” and what is 95X96″

i didn’t answer as quickly as earlier.

Why do u think we should select you today?

I told him few points ;) and then my interview was over.

A hectic day. After around 2 hrs we were called for the announcement of results. And then,

Ready for “If its not happening now doesn’t mean it will never happen” moment . He called the first name : Garima Goswami :)

Installing OpenCv in Ubuntu

Earlier i was using openCV with Microsoft Visual C++ 6.0. But let me tell you, it crashed a lot. Every time i needed to close the process from Task Manager. Then i decided to somehow install OpenCV for my ubuntu.
After searching and trying a lot for this, i was finally able to use opencv in GNU compiler(g++ or gcc).
Synaptic Package Manager has simplified the life to a great extent. OpenCV is now available in the ubuntu repositories.
Though there are some problems related to ‘ffmpeg’, i needed opencv for image processing only. So i have not mentioned here what to do about ‘ffmpeg’.

Things to know before starting installation:
i. This installation needs a C++ compiler like “g++”(which is most commonly used). So install g++ first using Synaptic or by following command at the terminal–

$ sudo apt-get install g++

ii. OpenCV requires GTK+ 2.0 or higher for displaying images. GTK is graphical user interface library. Type out the following code to know the version of GTK+ installed on ur pc.

$ dpkg -l | grep libgtk

This command should give o/p something like:

libgtk-directfb-2.0-0 2.16.1-0ubuntu2

If not, then u need to install the libraries for GTK+ 2.0 first, then start with this opencv installation.
To install GTK+ 2.0 libraries, type out the following command:

$ sudo apt-get install libgtk2.0-dev

If both g++ & GTK+ 2.0 are there then proceed as follows:

I am using Ubuntu 9.04 (Jaunty Jackalope) and i did the following steps to install & configure OpenCV(ver 1.0.0.6) successfully:

1. Go to Synaptic Package Manager (System> Administration> Synaptic Package Manager)
2. Search for “opencv” and install the main “opencv” package and the following lib files:
libcv
libcv-dev
libcvaux
libcvaux-dev
libhighgui
libhighgui-dev
opencv-doc
(‘python-opencv’ not required).
(you can also install opencv directly from the terminal by “sudo apt-get install” the above lib files
3. After installing all the packages, open a terminal & type this code:

export LD_LIBRARY_PATH=/home/opencv/lib
export PKG_CONFIG_PATH=/home/opencv/lib/pkgconfig

The above ones are default paths for the opencv libraries.
4. For testing:
Create a new folder & a file “hello.cpp” in it using any text editor & type this code in it:

#include < cv.h > /* required to use OpenCV */
#include < highgui.h > /* required to use OpenCV’s highgui */
#include < stdio.h >

int main(int argc, char *argv[]) {
IplImage* img=0; /* pointer to an image */
printf(“Hello\n”);
if(argv[1] != 0)
img = cvLoadImage(argv[1], 0); // 1 for color
else
printf(“Enter filename\n”);
if(img != 0) {
cvNamedWindow(“Display”, CV_WINDOW_AUTOSIZE); // create a window
cvShowImage(“Display”, img); // show image in window
cvWaitKey(0); // wait until user hits a key
cvDestroyWindow(“Display”);
}
else
printf(“File not found\n”);
return 0;
}

5. To check the path where opencv & other lib files are stored, do:

$ pkg-config –cflags opencv

(output will come as)
-I/usr/include/opencv

$ pkg-config –libs opencv
(output will come as)
-lcxcore -lcv -lhighgui -lcvaux -lml

These paths are needed to compile your opencv programs, as given in the next step.

6. To compile & run:

$ g++ -I/usr/include/opencv -lcxcore -lhighgui -lm hello.cpp
./a.out img

where “img” is the name of any image within the same folder with extension.
You should be able to see “Hello” and the image in a different window.

-> If this runs, Congrats! now you can run any C/C++ program with opencv lib.
Else, try

$ export PATH=$HOME/usr/bin/:$PATH

and go to step3 again.

7. Now lets simplify the above big command by making a shortcut for it:
go to your local home directory(cd /home/) and open the .bashrc file using gedit(the file will be hidden). Append the following to the file:

alias gcv=”g++ -I/usr/include/opencv -lcv -lcxcore -lcvaux -lhighgui -lm”

and save. Close the terminal and open it again.(as this process requires relogin of the terminal)

8.Now, go to directory containing a sample program & do

$ gcv filename.c && ./a.out
or
$ gcv filename.c
$ ./a.out input_img.jpg

As you can see the commands now become similar to $cc filename.c, $./a.out which are used normally for compiling and executing C programs.

****************************
Some ways to check whether all lib files are installed-
1. $ apt-cache search opencv
returns:
libcv-dev – development files for libcv
libcv0.9-0c2 – computer vision library
libcvaux-dev – development files for libcvaux
libcvaux0.9-0c2a – computer vision extension library
libhighgui-dev – development files for libhighgui
libhighgui0.9-0c2 – computer vision GUI library
opencv-doc – OpenCV documentation and examples

—————————————————————————
If you want to install openCV from a .tar file, refer this article:
Installing opencv in linux(Ubuntu) from .tar.gz file

The First Two Programs

Reblogged from Programming Praxis:

In their book The C Programming Language, Brian Kernigan and Dennis Ritchie say that the first program every programmer should write is a program that writes "Hello, world!" to the console. Then they give the second program that produces a fahrenheit/celsius temperature conversion table, with fahrenheit temperatures every 20 degrees from 0 to 300 and the corresponding celsius temperature to the nearest degree, each pair written on its own line with the two temperatures separated by tabs.

Read more… 233 more words

1. Download SystemC source from Accellera website.

2. Untar the package using tar -xzvf systemc-2.3.0.tgz or if this doesn’t work install 7zip using command line/ubuntu software centre and then type: 7z x filename  , in our case filename=systemc-2.3.0.tgz

(change permissions from the parent directory, if permission related error occurs, typing : chmod  -R +x systemc-2.3.0 )
3. Change to the top level directory systemc-2.3.0 : cd systemc-2.3.0
4. Make a directory  systemc230 for installation in your /usr/local/ path.

mkdir /usr/local/systemc230

5. Make a directory “objdir” in the directory systemc-2.3.0 : mkdir objdir
6. Change to objdir : cd objdir
7. now type: export CXX=g++

8. Run configure from objdir:  ../configure --prefix=/usr/local/systemc230
9. Do: make
10. Install by typing command: sudo make install

You are done with installation of SystemC 2.3.0. This version is packed with TLM package also. Now we can run our first Hello World! program.

Open your favourite text editor and enter the following program:

…………………………………………………………………………….

// All systemc modules should include systemc.h header file
#include <systemc.h>
// Hello_world is module name
SC_MODULE (hello_world) {
SC_CTOR (hello_world) {
// Nothing in constructor
}
void say_hello() {
//Print “Hello World” to the console.
cout << ”Hello World.\n”;
}
};

// sc_main in top level function like in C++ main
int sc_main(int argc, char* argv[]) {
hello_world hello(“HELLO”);
// Print the hello world
hello.say_hello();
return(0);
}

…………………………………………………………..

Save the file as hello.cpp. Use following command to export a variable SYSTEMC_HOME.

export SYSTEMC_HOME=/usr/local/systemc230/

Now you can use following command to compile the program:

g++ -I. -I$SYSTEMC_HOME/include -L. -L$SYSTEMC_HOME/lib-linux -Wl,-rpath=$SYSTEMC_HOME/lib-linux -o hello hello.cpp -lsystemc -lm

Once the program is compiled type following to run your program:
./hello

and you should get output:

SystemC 2.3.0-ASI — Aug 12 2012 09:27:22
Copyright (c) 1996-2012 by all Contributors,
ALL RIGHTS RESERVED


Hello World.

https://developers.google.com/android/adc/

The report for the project is almost done.This is the sequence diagram for my project. Preparing the presentations and other requisites.

Randoms

Visit link:

One of our mentors “Ninad Chilap” with the Aakash tablet.

http://www.theaustralian.com.au/higher-education/india-upgrades-worlds-cheapest-tablet/story-e6frgcjx-1226409903586

“In coming years, Aakash is likely to become a ubiquitous tool in the hands of students, at all levels of their education,” said Professor Deepak Phatak, heading up the project, in a release from IIT Bombay.

Busy with the final brush up off with the project. Project reports, presentations, etc. Ninad sir mailed the outline for the project report. Software engineering subject is really useful.

This is the outline:

……………………………………………………………………………………………………………………………

Contents

1 Introduction

  1. Background

  2. Design goals

2 Project Plan

2.1 Title and Scope of project

2.2 Client Detail

2.3 Resource requirement

2.3.1 H/W requirement

2.3.2 S/W requirement

2.4 Model used (iterative Model) *refer link for below model and put some diagram
http://www.onestoptesting.com/sdlc-models/iterative-model.asp

3 Designs and Implementation

3.1 High Level Design Document
3.1.1 ER Diagram

3.1.2 Use Case Diagram

3.1.3 Class Diagram

3.1.4 Sequence Diagram

3.1.5 Data flow Diagram

3.2 Low Level Design Document

3.2.1 Algorithms and flowchart

3.2.2 Interface design

3.2.3 Coding Modules

4. Test Plan

4.1 Black Box Testing

4.2 White Box Testing

4.3 Unit testing

4.4 Integration Testing

5. Screen Design

6. Summary and Conclusion

6.1 Summary

6.2 Further Enhancements

6.2.1 Virtualizing clusters of servers running Red5

6.2.2 Encoding Audio/Video Streams

6.2.3 Enhancing the classroom environment

6.2.4 Enhancing the already implemented modules

6.3 References and Bibliography

6.4 Conclusion 

……………………………………………………………………………………………………………………..

I got an online site for preparing the requisites such as use case diagrams and data flow diagrams:

http://www.gliffy.com/gliffy/#

Hope to complete all the work till sunday.

Ctrl+Shift+X -  Toggle between  showing  all  terminals  and  only  showing  the current 
 one.
 Ctrl+Shift+O - Split terminals Horizontally.

 Ctrl+Shift+E - Split terminals Vertically.

 Ctrl+Shift+Right - Move parent dragbar Right.

 Ctrl+Shift+Left - Move parent dragbar Left.
  Ctrl+Shift+UpMove parent dragbar Up.
 
  Ctrl+Shift+Down - Move parent dragbar Down.
 Ctrl+Shift+W - Close the current terminal.

 Ctrl+Shift+T -   Open new tab

 Ctrl+Plus (+) -  Increase  font  size. Note: this may require you
 to press shift, depending on your keyboard
 Ctrl+Minus (-) - Decrease font size. Note: this may require you to  press  shift, 
 depending   on your  keyboard
 Ctrl+Zero (0) - Restore font size to original setting.
Follow

Get every new post delivered to your Inbox.