Month: December 2014

Evolution of Operating Systems

Posted on Updated on

Serial Processing:

– No operating system

• Machines run from a console with display lights, toggle switches, input device, and printer

• Schedule time, e.g. sign up

• Setup included loading the compiler and source program, saving compiled program, loading and linking

• Simple Batch Systems

– Monitor

• Software that controls the sequence of events

• Batch jobs together

• Program branches back to monitor when Finished

Job Control Language (JCL)

• Special type of programming language

• Provides instruction to the monitor, e.g.

– What compiler to use

– What data to use

· Uniprogramming

• Processor must wait for I/O instruction to complete before preceding


· Multiprogramming

• When one job needs to wait for I/O, the processor can switch to the other job


· Time Sharing

• Using multiprogramming to handle multiple interactive jobs

• Processor’s time is shared among multiple users

• Multiple users simultaneously access the system through terminals

Posted By-: Vissicomp Technology Pvt. Ltd.

Website -:

ASP.NET – Interview Questions

Posted on Updated on


1. What is .NET Framework?

NET Framework is a complete environment that allows developers to develop, run, and deploy the following applications:

Console applications

Windows Forms applications

Windows Presentation Foundation (WPF) applications

Web applications (ASP.NET applications)

Web services

 Windows services

Service-oriented applications using Windows Communication Foundation (WCF)

Workflow-enabled applications using Windows Workflow Foundation (WF)

NET Framework also enables a developer to create sharable components to be used in distributed computing architecture. NET Framework supports the object-oriented programming model for multiple languages, such as Visual Basic, Visual C#, and Visual C++. .NET Framework supports multiple programming languages in a manner that allows language interoperability. This implies that each language can use the code written in some other language.

2. What are the main components of .NET Framework?

NET Framework provides enormous advantages to software developers in comparison to the advantages provided by other platforms. Microsoft has united various modern as well as existing technologies of software development in .NET Framework. These technologies are used by developers to develop highly efficient

applications for modern as well as future business needs. The following are the key components of .NET Framework:

NET Framework Class Library

Common Language Runtime

Dynamic Language Runtimes (DLR)

Application Domains

Runtime Host

Common Type System

Metadata and Self-Describing Components

Cross-Language Interoperability

NET Framework Security


Side-by-Side Execution

3. List the new features added in .NET Framework 4.0.

The following are the new features of .NET Framework 4.0:

Improved Application Compatibility and Deployment Support

Dynamic Language Runtime

Managed Extensibility Framework

Parallel Programming framework

Improved Security Model

Networking Improvements

Improved Core ASP.NET Services

Improvements in WPF 4

Improved Entity Framework (EF)

Integration between WCF and WF

4. What is an IL?

Intermediate Language is also known as MSIL (Microsoft Intermediate Language) or CIL (Common Intermediate Language). All .NET source code is compiled to IL. IL is then converted to machine code at the point where the software is installed, or at run-time by a Just-In-Time (JIT) compiler.

5. What is Manifest?

Assembly metadata is stored in Manifest. Manifest contains all the metadata needed to do the following things

Version of assembly.

Security identity.

Scope of the assembly.

Resolve references to resources and classes.

The assembly manifest can be stored in a PE file either (an .exe or) .dll with Microsoft

intermediate language (MSIL code with Microsoft intermediate language (MSIL) code or in a stand-alone PE file, that contains only assembly manifest information.

6. What are code contracts?

Code contracts help you to express the code assumptions and statements stating the behavior of your code in a language-neutral way. The contracts are included in the form of pre-conditions, post-conditions and object- invariants. The contracts help you to improve-testing by enabling run-time checking, static contract verification, and documentation generation. The System.Diagnostics.Contracts namespace contains static classes that are used to express contracts in your code.

7. Name the classes that are introduced in the System.Numerics namespace.

The following two new classes are introduced in the System.Numerics namespace:

BigInteger – Refers to a non-primitive integral type, which is used to hold a value of any size. It has no lower and upper limit, making it possible for you to perform arithmetic calculations with very large numbers, even with the numbers which cannot hold by double or long.

Complex – Represents complex numbers and enables different arithmetic operations with complex numbers. A number represented in the form a + bi, where a is the real part, and b is the imaginary part, is a complex number.

8. What is managed extensibility framework?

Managed extensibility framework (MEF) is a new library that is introduced as a part of .NET 4.0 and Silverlight 4. It helps in extending your application by providing greater reuse of applications and components. MEF provides a way for host application to consume external extensions without any configuration requirement.

9. Explain memory-mapped files.

Memory-mapped files (MMFs) allow you map the content of a file to the logical address of an application. These files enable the multiple processes running on the same machine to share data with each Other. The MemoryMappedFile.CreateFromFile() method is used to obtain a MemoryMappedFile object that represents a persisted memory-mapped file from a file on disk. These files are included in the System.IO.MemoryMappedFiles namespace. This namespace contains four classes and three enumerations to help you access and secure your file mappings.

10. What is Common Type System (CTS)?

CTS is the component of CLR through which .NET Framework provides support for multiple languages because it contains a type system that is common across all the languages. Two CTS- compliant languages do not require type conversion when calling the code written in one language from within the code written in another language. CTS provide a base set of data types for all the languages supported by.NET Framework. This means that the size of integer and long variables is same across all .NET-compliant programming languages. However, each language uses aliases for the base data types provided by CTS. For example, CTS uses the data type system. int32 to represent a 4 byte integer value; however, Visual Basic uses the alias integer for the same; whereas, C# uses the alias int. This is done for the sake of clarity and simplicity.

11. Give a brief introduction on side-by-side execution. Can two applications, one using private assembly and the other using the shared assembly be stated as side-by-side executables?

Side-by-side execution enables you to run multiple versions of an application or component and CLR on the same computer at the same time. As versioning is applicable only to shared assemblies and not to private assemblies, two applications, one using a private assembly and other using a shared assembly, cannot be stated as side-by-side executables.

12. Which method do you use to enforce garbage collection in .NET?

The System.GC.Collect() method.

13. State the differences between the Dispose() and Finalize().

CLR uses the Dispose and Finalize methods to perform garbage collection of run-time objects of .NET applications. The Finalize method is called automatically by the runtime. CLR has a garbage collector (GC), which periodically checks for objects in heap that are no longer referenced by any object or program. It calls the Finalize method to free the memory used by such objects. The Dispose method is called by the programmer. Dispose is another method to release the memory used by an object. The Dispose method needs to be explicitly called in code to dereference an object from the heap. The Dispose method can be invoked only by the classes that implement the IDisposable interface.

14. What is code access security (CAS)?

Code access security (CAS) is part of the .NET security model that prevents unauthorized access of resources and operations, and restricts the code to perform particular tasks.

15. Differentiate between managed and unmanaged code?

Managed code is the code that is executed directly by the CLR instead of the operating system. The code compiler first compiles the managed code to intermediate language (IL) code, also called as MSIL code. This code doesn’t depend on machine configurations and can be executed on different machines.

Unmanaged code is the code that is executed directly by the operating system outside the CLR environment. It is directly compiled to native machine code which depends on the machine configuration. In the managed code, since the execution of the code is governed by CLR, the runtime provides different services, such as garbage collection, type checking, exception handling, and security support. These services

help provide uniformity in platform and language-independent behavior of managed code applications. In the unmanaged code, the allocation of memory, type safety, and security is required to be taken care of by the developer. If the unmanaged code is not properly handled, it may result in memory leak. Examples of unmanaged code are ActiveX components and Win32 APIs that execute beyond the scope of native CLR.

16. What are tuples?

Tuple is a fixed-size collection that can have elements of either same or different data types. Similar to arrays, a user must have to specify the size of a tuple at the time of declaration. Tuples are allowed to hold up from 1 to 8 elements and if there are more than 8 elements, then the 8th element can be defined as another tuple. Tuples can be specified as parameter or return type of a method.

17. What is garbage collection? Explain the difference between garbage collections in .NET 4.0 and earlier versions.

Garbage collection prevents memory leaks during execution of programs. Garbage collector is a low-priority process that manages the allocation and deallocation of memory for your application. It checks for the unreferenced variables and objects. If GC finds any object that is no longer used by the application, it frees up the memory from that object. GC has changed a bit with the introduction of .NET 4.0. In .NET 4.0, the GC.Collect() method contains the following overloaded methods:


GC.Collect(int, GCCollectionMode)

Another new feature introduced in .NET is to notify you when the GC.Collect() method is invoked and completed successfully by using different methods. The .NET 4.0 supports a new background garbage collection that replaces the concurrent garbage collection used in earlier versions. This concurrent GC allocates memory while running and uses current segment (which is 16 MB on a workstation) for that. After that, all threads are suspended. In case of background GC, a separate ephemeral GC – gen0 and gen1 can be started, while the full GC – gen0, 1, and 2 – is already running.

18. How does CAS works?

There are two key concepts of CAS security policy- code groups and permissions. A code group contains assemblies in it in a manner that each .NET assembly is related to a particular code group and some permissions are granted to each code group. For example, using the default security policy, a control downloaded from a Web site belongs to the Zone, Internet code group, which adheres to the permissions defined by the named permission set. (Normally, the named permission set represents a very restrictive range of permissions.)

Assembly execution involves the following steps:

1. Evidences are gathered about assembly.

2. Depending on the gathered evidences, the assembly is assigned to a code group.

3. Security rights are allocated to the assembly, depending on the code group.

4. Assembly runs as per the rights assigned to it.

20. What is Difference between NameSpace and Assembly?

Following are the differences between namespace and assembly:

Assembly is physical grouping of logical units, Namespace, logically groups classes.

 Namespace can span multiple assembly.

Posted By-: Vissicomp Technology Pvt. Ltd.

Website -:


Posted on Updated on


Questions : 1

What is database or database management systems (DBMS)? and – What’s the difference between file and database? Can files qualify as a database?

Answers :

Database provides a systematic and organized way of storing, managing and retrieving from collection of logically related information. Secondly the information has to be persistent, that means even after the application is closed the information should be persisted. Finally it should provide an independent way of accessing data and should not be dependent on the application to access the information. Main difference between a simple file and database that database has independent way (SQL) of accessing information while simple files do not File meets the storing, managing and retrieving part of a database but not the independent way of accessing data. Many experienced programmers think that the main difference is that file cannot provide multi-user capabilities which a DBMS provides. But if we look at some old COBOL and C programs where file where the only means of storing data, we can see functionalities like locking, multi-user etc provided very efficiently.

Questions : 2

What is SQL ?

Answers : 2

SQL stands for Structured Query Language.SQL is an ANSI (American National Standards Institute) standard computer language for accessing and manipulating database systems. SQL statements are used to retrieve and update data in a database.


Questions : 3

What’s difference between DBMS and RDBMS ?

Answers : 3

DBMS provides a systematic and organized way of storing, managing and retrieving from collection of logically related information. RDBMS also provides what DBMS provides but above that it provides relationship integrity. So in short we can say
These relations are defined by using “Foreign Keys” in any RDBMS.Many DBMS companies claimed there DBMS product was a RDBMS compliant, but according to industry rules and regulations if the DBMS fulfills the twelve CODD rules it’s truly a RDBMS. Almost all DBMS (SQL SERVER, ORACLE etc) fulfills all the twelve CODD rules and are considered as truly RDBMS.


Questions : 4

What are CODD rules?

In 1969 Dr. E. F. Codd laid down some 12 rules which a DBMS should adhere in order to get the logo of a true RDBMS.

Rule 1: Information Rule.
“All information in a relational data base is represented explicitly at the logical level and in exactly one way – by values in tables.”
Rule 2: Guaranteed access Rule.
“Each and every datum (atomic value) in a relational data base is guaranteed to be logically accessible by resorting to a combination of table name, primary key value and column name.”
In flat files we have to parse and know exact location of field values. But if a DBMS is truly RDBMS you can access the value by specifying the table name, field name, for instance Customers.Fields [‘Customer Name’].
Rule 3: Systematic treatment of null values.
“Null values (distinct from the empty character string or a string of blank characters and distinct from zero or any other number) are supported in fully relational DBMS for representing missing information and inapplicable information in a systematic way, independent of data type.”.
Rule 4: Dynamic on-line catalog based on the relational model.
“The data base description is represented at the logical level in the same way as ordinary data, so that authorized users can apply the same relational language to its interrogation as they apply to the regular data.”The Data Dictionary is held within the RDBMS, thus there is no-need for off-line volumes to tell you the structure of the database.
Rule 5: Comprehensive data sub-language Rule.
“A relational system may support several languages and various modes of terminal use (for example, the fill-in-the-blanks mode). However, there must be at least one language whose statements are expressible, per some well-defined syntax, as character strings and that is comprehensive in supporting all the following items
Data Definition
View Definition
Data Manipulation (Interactive and by program).
Integrity Constraints
Transaction boundaries ( Begin , commit and rollback)
Rule 6: .View updating Rule
“All views that are theoretically updatable are also updatable by the system.”
Rule 7: High-level insert, update and delete.
“The capability of handling a base relation or a derived relation as a single operand applies not only to the retrieval of data but also to the insertion, update and deletion of data.”
Rule 8: Physical data independence.
“Application programs and terminal activities remain logically unimpaired whenever any changes are made in either storage representations or access methods.”
Rule 9: Logical data independence.
“Application programs and terminal activities remain logically unimpaired when information-preserving changes of any kind that theoretically permit un-impairment are made to the base tables.”
Rule 10: Integrity independence.
“Integrity constraints specific to a particular relational data base must be definable in the relational data sub-language and storable in the catalog, not in the application programs.”Rule 11: Distribution independence.
“A relational DBMS has distribution independence.”
Rule 12: Non-subversion Rule.
“If a relational system has a low-level (single-record-at-a-time) language, that low level cannot be used to subvert or bypass the integrity Rules and constraints expressed in the higher level relational language (multiple-records-at-a-time).”


Questions : 5

What are E-R diagrams?


Answers : 5

E-R diagram also termed as Entity-Relationship diagram shows relationship between various tables in the database. .


Questions : 6

How many types of relationship exist in database designing?


Answers : 6

There are three major relationship models:-


Questions : 7

7.What is normalization? What are different type of normalization?


Answers : 7

There is set of rules that has been established to aid in the design of tables that are meant to be connected through relationships. This set of rules is known as Normalization.
Benefits of Normalizing your database include:
=>Avoiding repetitive entries
=>Reducing required storage space
=>Preventing the need to restructure existing tables to accommodate new data.
=>Increased speed and flexibility of queries, sorts, and summaries.
Following are the three normal forms :-
First Normal Form
For a table to be in first normal form, data must be broken up into the smallest un possible.In addition to breaking data up into the smallest meaningful values, tables first normal form should not contain repetitions groups of fields.
Second Normal form
The second normal form states that each field in a multiple field primary keytable must be directly related to the entire primary key. Or in other words,each non-key field should be a fact about all the fields in the primary key.
Third normal form
A non-key field should not depend on other Non-key field.


Questions : 8

What is denormalization ?


Answers : 8

Denormalization is the process of putting one fact in numerous places (its vice-versa of normalization).Only one valid reason exists for denormalizing a relational design – to enhance performance.The sacrifice to performance is that you increase redundancy in database.


Questions : 9

Can you explain Fourth Normal Form and Fifth Normal Form ?

Ads by InfoAd Options


Answers : 9

In fourth normal form it should not contain two or more independent multi-v about an entity and it should satisfy “Third Normal form”.
Fifth normal form deals with reconstructing information from smaller pieces of information. These smaller pieces of information can be maintained with less redundancy.


Questions : 10

Have you heard about sixth normal form?


Answers : 10

If we want relational system in conjunction with time we use sixth normal form. At this moment SQL Server does not supports it directly.


Posted By-: Vissicomp Technology Pvt. Ltd.

Website -:

String Handling functions in C++

Posted on Updated on

String Handling functions in C++

Example of strlen()

#include <stdio.h>

#include <string.h>

void main(){

char a[20]=”Program”;

char b[20]={‘P’,’r’,’o’,’g’,’r’,’a’,’m’,”};

char c[20];

printf(“Enter string: “);


printf(“Length of string a=%d \n”,strlen(a));

//calculates the length of string before null charcter.

printf(“Length of string b=%d \n”,strlen(b));

printf(“Length of string c=%d \n”,strlen(c));



Enter string: String

Length of string a=7

Length of string b=7

Length of string c=6

Example of strcpy()
#include <stdio.h>
#include <string.h>
void main(){
    char a[10],b[10];
    printf("Enter string: ");
    strcpy(b,a);   //Content of string a is copied to string b.
    printf("Copied string: ");


Enter string: Programming Tutorial
Copied string: Programming Tutorial
Example of strcat()
#include <stdio.h>
#include <string.h>
Void main(){
    char str1[]="This is ", str2[]="";
    strcat(str1,str2);   //concatenates str1 and str2 and resultant string is stored in str1.


This is
Example of strcmp()
#include <stdio.h>
#include <string.h>
int main(){
  char str1[30],str2[30];
  printf("Enter first string: ");
  printf("Enter second string: ");
      printf("Both strings are equal");
      printf("Strings are unequal");
  return 0;


Enter first string: Apple     
Enter second string: Apple
Both strings are equal.

Posted By-: Vissicomp Technology Pvt. Ltd.

Website -:

File Handling

Posted on











Posted By-: Vissicomp Technology Pvt. Ltd.

Website -:

C Input & Output

Posted on Updated on

getchar() & putchar(), gets() & puts(), scanf() and printf()

C – Input & Output

When we are saying Input that means to feed some data into program. This can be given in the form of file or from command line. C programming language provides a set of built-in functions to read given input and feed it to the program as per requirement.

When we are saying Output that means to display some data on screen, printer or in any file. C programming language provides a set of built-in functions to output the data on the computer screen as well as you can save that data in text or binary files.

The Standard Files

C programming language treats all the devices as files. So devices such as the display are addressed in the same way as files and following three file are automatically opened when a program executes to provide access to the keyboard and screen.

Standard File

File Pointer


Standard input



Standard output



Standard error


Your screen

The file points are the means to access the file for reading and writing purpose. This section will explain you how to read values from the screen and how to print the result on the screen.

The getchar() &putchar() functions

The intgetchar(void) function reads the next available character from the screen and returns it as an integer. This function reads only single character at a time. You can use this method in the loop in case you want to read more than one characters from the screen.

The intputchar(int c) function puts the passed character on the screen and returns the same character. This function puts only single character at a time. You can use this method in the loop in case you want to display more than one character on the screen. Check the following example:




The gets() & puts() functions

The char *gets(char *s) function reads a line from stdin into the buffer pointed to by s until either a terminating newline or EOF.

The intputs(const char *s) function writes the string s and a trailing newline to stdout.


When the above code is compiled and executed, it waits for you to input some text when you enter a text and press enter then program proceeds and reads the complete line till end and displays it as follows:


The scanf() and printf() functions

The intscanf(const char *format, …) function reads input from the standard input stream stdin and scans that input according to format provided.

The intprintf(const char *format, …) function writes output to the standard output stream stdout and produces output according to a format provided.

The format can be a simple constant string, but you can specify %s, %d, %c, %f, etc., to print or read strings, integer, character or float respectively. There are many other formatting options available which can be used based on requirements. For a complete detail you can refer to a man page for these function. For now let us proceed with a simple example which makes things clear:




Posted By-: Vissicomp Technology Pvt. Ltd.

Website -: