You are on page 1of 9

C Tutorial Interview Questions from where i can download the vi editor for windows???

plz tell me The output of this printf (?%d?,'A'); is 65 ,so what is the indicates the 65 and what is it's name? #include int f(int,int); int main() { printf("%d",f(20,1)); return 0; } int f(int n,int k) { if(n==0) return 0; else if(n%2)return f(n/2,2*k)+k; else return f(n/2,2*k)-k; }How this code is generating 9 as output please explain? 1. Which one is correct, according to the ANSI specifications? a) int main() b) void main() c) void main(void) d) I don't know writer a program to print following pattern- 1 2 1 2 3 2 1 2 3 4 3 2 1 2 3 4 3 2 1 2 3 2121 If NULL and 0 are equivalent as null pointer constants, which should I use? Should I use symbolic names like TRUE and FALSE for Boolean constants, or plain 1 and 0? What is Hungarian Notation? Is it worthwhile? People always say that good style is important I just typed in this program, and it is acting strangely. Can you see anything wrong with it? How can I shut off the warning ... Where can I get an ANSI-compatible lint? Dont ANSI function prototypes render lint obsolete? I need code to parse and evaluate expressions. How can I find out if there are characters available for reading? How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators? How can I make it pause before closing the program output window? How do I read the arrow keys? What about function keys? How can I do serial comm port I O? How can I direct output to the printe How do I send escape sequences to control a terminal or other device? How can I access an I O board directly? How can I do graphics in C? How can I send mail from within a C program? How can I check whether a file exists? I want to warn the user if a requested input file is missing. How can I find out the size of a file, prior to reading it in? How can I find the modification date and time of a file?

How can I insert or delete a line (or record) in the middle of a file? How can I delete a file? How do I copy files? Why cant I open a file by its explicit path? fopen isnt letting me open files like "$HOME/.profile" and "~/.myrcfile". How can I increase the allowable number of simultaneously open files? How can I find out how much free space is available on disk? How can I read a directory in a C program? How do I create a directory? How do I remove a directory (and its contents)? How can I find out how much memory is available? How can I allocate arrays or structures bigger than 64K? I thought that using large model meant that I could use more than 64K of data! How can I invoke another program (a standalone executable, or an operating system command) from within a C program? How can I call system when parameters (filenames, etc.) of the executed command arent known until run time How do I get an accurate error status return from system on MS-DOS? How can I invoke another program or command and trap its output? How can my program discover the complete pathname to the executable from which it was invoked? How can I automatically locate a programs configuration files in the same directory as the executable? How can I open files mentioned on the command line, and parse option flags? Is exit(status) truly equivalent to returning the same status from main? How can I read in an object file and jump to locations in it? How can I implement a delay, or time a users response, with sub-second resolution? How can I trap or ignore keyboard interrupts like control-C?

C++ Tutorial Interview Questions what debugger (for finding memory leaks) do you use most often? (C++, windows) The Burrows-Wheeler Transformation As you have seen during your initial inpractical assessment compression algorithms such as run-length encoding perform best when there are long sequences of identical characters. Is it possible to transform our sequence in such a way as to possibly increase the number of successive identical characters in a reversible manner? We will look at one such transformation which is employed in real-world compression algorithms such as bzip2. In this practical assignment you will only be required to perform the forward transformation. Feel free to consult the wikipedia entry on the transformation (included in additional files) You must create a C++ program as follows ? It must take as command line argument input a single string composed of upper case alphabetic characters and must prepend the character '^' and append '|' which represent the start and end position markers respectively. ? All possible rotations of the string must be calculated, stored in an appropriate data structure and output to the screen. e.g. If the input is '^TOMORROW|' (^ and | are the added start and end characters) The rotations will be ^TOMORROW| |^TOMORROW W|^TOMORRO OW|^TOMORR ROW|^TOMOR RROW|^TOMO ORROW|^TOM MORROW|^TO OMORROW|^T TOMORROW|^ ? These variations will need to be sorted according to their first character and output to the screen. You have been provided with a library BWTSort in order to accomplish the sorting. We will analyse sorting in more detail later on in the course. Do not submit the library to EVE as this will cause your practical to be flagged as a copy. e.g. MORROW|^TO OW|^TOMORR ORROW|^TOM OMORROW|^T ROW|^TOMOR RROW|^TOMO TOMORROW|^ W|^TOMORRO ^TOMORROW| |^TOMORROW ? The final coloumn of the What is the need of getoxy and gotoxy funtions in c++ If you are given task to build search engine, how will you arrange items and what kind of algorithm will you use to get the quickest search result? I'm using OpenGL in C++, and dealing with ilumination. I'd like my small car game to have two modes, one day-mode and another night-mode, that people would select from the menu. Basically the difference between the two modes will be the color of the source light. I've already written the piece of code that does it. First I'm not sure where to paste it in the program. I've put it in mycamera.cpp, that will follow, and I can't see my route anymore, it's all grey and strange... Anyone

knows why? And what am I doing wrong? #include "MyCamera.h" #include "Car.h" namespace proj{ MyCamera::MyCamera() : Entity("MyCamera"){ } MyCamera::~MyCamera(){ } void MyCamera::init(){ cg::tWindow win = cg::Manager::instance()->getApp()->getWindow(); _winWidth = win.width; _winHeight = win.height; } void MyCamera::draw(){ Car *_car; _car = (Car*)cg::Registry::instance()->get("Car2"); glMatrixMode(GL_PROJECTION); glLoadIdentity(); _position = _car->getPosition(); gluPerspective( 45, _winWidth/_winHeight ,1,1500); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); gluLookAt(_position[0],_position[1]-500, 400, _position[0],_position[1], 0, 0, 1,0); // init glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); // pre-definies GLfloat position[4] = { 1.0, 1.0, 1.0, 0.0}; /*o zero final indica que trato duma luz direccional. as coordenadas anteriores so os vectores direco dos raios*/ GLfloat ambientLight[4] = { 1.0, 1.0, 0, 1.0}; GLfloat diffuseLight[4] = { 1.0, 1.0, 0, 1.0 }; GLfloat specularLight[4] = { 1.0, 1.0, 0, 1.0}; glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, GL_TRUE);//local viewpoint // atribui-las a fonte glLightfv(GL_LIGHT0, GL_AMBIENT, ambientLight); glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuseLight); glLightfv(GL_LIGHT0, GL_SPECULAR, specularLight); glLightfv(GL_LIGHT0, GL_POSITION, position); } void MyCamera::onReshape(int width, int height){ _winWidth = width; _winHeight = height; } } What Is scoop Create a class called space which contains three data members of type integer.Include member function getdata() (to read values)and displaydata() (to display values) in the class space.Overload the - oprator to add the objects of type space.Write this function in such way that, we can write a statement like S3=S1,S2 Where S1,S2 and S3 are objects of space Write a function which returns the maximum digit of its arguments of type integer. Maxdigit(int) example:for(234,it will return 4,for 89->9 Write a program to find the sum of integers that are evenly divisible by 10 bfor a given range (example 1 through 50) Input three positive integers representing the sides of triangle and determine wether they form a valid triangle.hint: in triangle the sum of any two sides must always be greater than the third side Write a program to convert given amount in EURO to local OMR by reading the amount in EURO from a file and write equivalent amount in OMR to another file. 1 EURO=0.52004 OMR What is c++? Is in c++ an array consists of broken memory locations?

what happen if i assign a number with a decimal point to an integer rather than to a float ? consider the following line of code : int a NUMBER = 5.4 what should the 64-bit integer type on new,64-bit machines be? Applications of c++ object oriented programs? What is a mutable member? Define a constructor - What it is and how it might be called (2 methods). Anything wrong with this code? T *p = 0; delete p; Anything wrong with this code? T *p = new T[10]; delete p; What is an orthogonal base class? What is an adaptor class or Wrapper class? What is the dangling pointer in c++ What is a mixin class? What is a concrete class? What is the handle class? What is an action class? When can you tell that a memory leak will occur? What is a parameterized type? Differentiate between a deep copy and a shallow copy? What is an opaque pointer? What is a smart pointer? What is cloning? Describe the main characteristics of static functions. Will the inline function be compiled as the inline function always? Justify. Define a way other than using the keyword inline to make a function inline. How can a '::' operator be used as unary operator? What are the main underlying concepts of object orientation? What do u meant by "SBI" of an object? Differentiate persistent & non-persistent objects? What do you meant by active and passive objects What is meant by software development method? Why does the function arguments are called as "signatures"? What is Memory alignment?? When are temporary variables created by C++ compiler? When do use "const" reference arguments in function? What are storage qualifiers in C++ ? What are C++ storage classes? What is conversion constructor? What are all the implicit member functions of the class? Or what are all the functions which compiler implements for us if we don't define one.??

Data Structures Using C Interview Questions What is the base band and band pass signal? What is the data structures used to perform recursion? List out the areas in which data structures are applied extensively? What is data structure? Difference between calloc and malloc in data structures? What exactly does this procedure BUBBLE_SORT (K, N) does? Define addressing and linear addressing functions? Define Index area and its subdivisions? Define Simulation? What is the distant relationship between a list structure and a digraph? Name two desirable properties of hashing functions. What is a one way chain or singly linked linear list? What is splitting? What is linear hashing? What is a priority queue? Explain the three applications in which stacks are used? Define and explain ?push? and ?pop?? Define stack? How do you define a vector for a data structure? Define an addressing function for a data structure? State procedure in accordance with function? Define data structure in terms of relation? What is the difference between Storage structure and file structure? what is the minimum no.of queues required to implement heap sort?explain Define datastructure? A tree can have a duplicate key If the depth of a tree is 3 levels, then what is the Size of the Tree? The size of a tree is the number of nodes on the tree. The depth of a tree is the _______ of a tree A leaf node does not have any child nodes What is a leaf node? What is the purpose of a left child node and a right child node? Parent Node is also called as _____ Node Value of the first linked list index is _______ _______ form of access is used to add and remove nodes from a queue New nodes are added to the _____ of the queue. What is the benefit of using a queue linked list?

A _______ is a data structure that organizes data similar to a line in the supermarket, where the first one in line is the first one out. StackLinkedList class inherits the LinkedList class The pop() member function determines if the stack is empty by calling the _____ member function What happens when you push a new node onto a stack? A stack-linked list is a data structure that uses a ______ to create a stack Astack is a data structure that organizes data similar to how you organize dishes in a stack on your kitchen counter A doubly linked list is a linked list consisting of nodes that have both the previous and next elements How can a node be inserted in the middle of a linked list? Definitions of member functions for the LinkedList class are contained in Linked list C++ application is organized into three files.They are _____, ______ and _____ Identify the error in the following example of the use of a displayNodesReverse() member function void displayNodesReverse(){ cout << "Nodes in reverse order:"; NODE* temp = back; while(temp != NULL) { cout << " " << temp->data; temp = temp->Next; }} The destructor is responsible for allocating all the memory that was allocated for the linked list. The destroyList() member function deletes the contents of the linked list and ________________

Graphics Interview Questions


What are the most common spelling or grammar mistakes in photography? Tell me what equipment do you use? Have you had any formal graphics training? Explain Do you shoot RAW or JPEG? Tell me, you use any actions or special programs? Please tell us, you need any assistants or second shooters? Explain How do I take good portraits? What is albums and album design software do you use? Explain What is Graphics? Have you had any formal training? Do you need any assistants or second shooters? What albums and album design software do you use? Do you use any actions or special programs? What are the most common spelling/grammar mistakes in photography? How do I take good portraits? Do you shoot RAW or JPEG? What equipment do you use? What is Graphics?

You might also like