Programming Concepts

  Home  Computer Programming  Programming Concepts


“Conceptual frequently Asked Questions by expert members with experience in Programming Concepts. So get preparation for the Conceptual job interview questions”



112 Programming Concepts Questions And Answers

41⟩ Give one real time application where static variables are used?

Thinks of a situation where you need to do some work just once in a function irrespective of how many times that function is invoked then u can have a static variable which will keep a track of it. eg int main () { static int once = 0; if (!once) { once++; /*code need to be executed once*/ } /*reset of the code*/ }

 170 views

43⟩ Explain what is the OSI Model?

OSI is Open System Interface Model. It is a concept which is used to make data transfer in steps. There are 7 layers and each layer interact with its counterpart. earlier a product made by any abc co was able to communicate with the same company product. to communicate with different co's products it was created. as it's name shows "OPEN System Interface"

 189 views

45⟩ What is virtual Memory under Linux?

Linux supports virtual memory, that is, using a disk as an extension of RAM so that the effective size of usable memory grows correspondingly. The kernel will write the contents of a currently unused block of memory to the hard disk so that the memory can be used for another purpose. When the original contents are needed again, they are read back into memory. This is all made completely transparent to the user; programs running under Linux only see the larger amount of memory available and don't notice that parts of them reside on the disk from time to time. Of course, reading and writing the hard disk is slower (on the order of a thousand times slower) than using real memory, so the programs don't run as fast. The part of the hard disk that is used as virtual memory is called the swap space

 159 views

46⟩ How to remove sections in report in reportnet?

Remove Sections

To remove a section, do the following:

Steps

1. Delete the section header.

2. From the View menu, click Page Structure.

3. Expand Page Body until you see the data container in which you added the section.

The data container is nested in the List object that is created when you add a section.

4. Drag the data container to Page Body.

The data container appears as a node of Page Body.

5. Delete the List object.

In the Query Explorer, the query that is created when you add a section is also deleted.

6. From the View menu, click Page Design.

7. In the Insertable Objects pane, click the Query Items tab.

8. Drag the query item that was used as a section header back into the data container.

 194 views

52⟩ A function is running, it has its own stack pointer, memory area now it invokes another function from this point what changes will be in its memory area and what other changes in data segment, stack segment, heap segment. I want a complete picture of memory architecture?

There will be a lot of changes in fact. First of all, all the variables the function was suing needs to be pushed into the stack. (we need all these variables when we return from the other function). The Program counter will be pushed to stack too... (When the "return" of second function occurs we should know where to 'return' to)These are the basics which are bound to happen when a function calls another.

 173 views

55⟩ Define raster and vector data. Explain what is the difference between raster and vector data?

Raster data is a set of horizontal lines composed of individual pixels, used to form an image on a CRT or other screen.Raster data makes use of matrix of square areas to define where features are located. These squares are typically of uniform size, and their size determines the detail that can be maintained in the dataset.Raster data represent square areas, they describe interiors rather than boundaries. Vector data use X and Y coordinates to define the locations of points, lines, and areas (polygons) that correspond to map features, vector data tend to define centers and edges of features.They are excellent for capturing and storing spatial details

 198 views

56⟩ Write a C program to reverse the string without using strrev() function?

#include <stdio.h>

#include <conio.h>

#include <string.h>

void main()

{

char *str;

int i,len;

//not using any temp variable and assume we can use only string array and length

printf("Enter String : ");

scanf("%s",str);

len=strlen(str)-1;

for(i=0;i<strlen(str)/2;i++)

{

str[i]+=str[len];

str[len]=str[i]-str[len];

str[i]=str[i]-str[len--];

}

printf("Reverse String is : %s",str);

getch();

}

 175 views