Tuesday, 15 April 2014

C - Structures - Bit Field

C language:  - BIT FIELDS in Structures
·        C permits us to use small bit fields to hold data items and thereby to pack several data items in a word or 2 bytes of memory.
·        A bit field is a set of adjacent bits whose size can be from 1to16 bits in lengths.
·        The name and size of bit fields are declared using a structure.
·        The syntax of bit fields is

Struct tag- name
{
   data-type  name1: bit-lenth;
   data-type  name2: bit-lenth;
    ………………………
    ………………………
   data- type  nameN: bit-lenth;
}

·        The data type is either int or unsigned int or signed int
·        The length is the number of bits(one bit for signed int or int).
The rules for bit fields :
1)    The first field always starts with the first bit of the word.
2)    A bit field cannot overlap integer boundaries.
3)    There can be unnamed fields declared with size.
Example:
Unsigned  :  bit-length
4)    There can be unused bits in a word.
5)    We cannot take the address of a bit field variable.
6)    We cannot use scanf,pointers,arrays to read values into bit fields.
7)    Bit fields should be assigned values that are within the range of their size.

Example:

Struct  personal

{
   Unsigned sex                   :  1
   Unsigned age                   :  7
   Unsigned m_status         :  1
   Unsigned children           :  3
   Unsigned                           :  4
} emp;
This defines a variable name emp with four bit fields. The range of values each field could have as follows:

            Bit field            Bit length        Range  of value

             Sex                       1                   0 or 1

             Age                       7                   0 or 127      

            M_status              1                   0 or 1

           Children                 3                   0 to 7            

Friday, 11 April 2014

I BSc - C & MS Office Viva Questions



I B.SC C & MS Office VIVA QUESTION BANK

C Viva Questions
1.      What are Translators?
2.      Difference between Interpreter and Compiler.
3.      Features of “C” Language.
4.      Applications of “C” language?
5.      Structure of “C” program.
6.      What is an Escape Sequence, What are they?
7.      What is Character set?(about ASCII)
8.      Mention ‘C’ tokens.
9.      What are Keywords and Identifiers? Mention some of them.
10.  What are constants?                                                            11.  What are Integer Constants?
12.  What are Single character Constants?                              13.  What are string constants?
14.  What are variables? Types of variables?
15.  What are different data types that ‘C’ supports?
16.  What are fundamental datatypes?                                   17.  What is declaration of variables?
18.  What are various operators supported by ‘C’ , Explain with syntax and example.
(Arithmetic operators, Relational operators, Logical operators, Assignment operators, Increment and Decrement operators, Bitwise operators).
19.  Precedence of Arithmetic operators.
20.  Mathematical Functions.
21.  Reading a character(Explain ‘getchar’).
22.  Reading string of characters (Explain ‘gets()’).
23.  Formatted Input (Explain ‘scanf’).
24.  Writing a character (Explain ‘putchar()’).
25.  Writing string of characters (Explain ‘puts()’).
26.  Writing a formatted output (printf).
27.  Explain ‘if’ structure.
28.  Explain ‘if-else’ structure.
29.  Explain ‘else-if’ structure.
30.  Explain ‘Switch’ statement with syntax.
31.  Explain ‘GoTo’ statement.
32.  What is looping? Types of looping statements.
33.  Explain ‘While’ statement with syntax and example.
34.  Explain ‘do-While’ statement with syntax and example.
35.  Explain ‘for’ statement with syntax and example.
36.  What is an array?                                                       37.  What are various string functions?
38.  What is a function declaration or prototype?      39.  What is a function?
40.  What are the parts of Function definition?          41.  Explain the function concept.
42.  Explain category of functions.                                 43.  What is a ‘call by value’ or ‘pass by value’?




44.How is an array element refered?
45.What does an array name contains?
46.Uses of arrays
47.What are one dimensional arrays?
48.what are two dimensional arrays?
49.What are multidimensional arrays?
50.What is the difference between getch() and gets()
51.How any array is passed as an argument to a functions?
52.What is scope of a variable?
53.What is visibility of a variable?
54.What is lifetime of a variable?
55.What are the various storage classes?
56.What are qualifiers?
57.What are external and register variables?
58.What are automatic and static variables?
59.What are local and global variables?
60.What is a structure?
61.Compare arrays and structures?
62.How elements of structure variables are referred?
      What are bit fields?
63.What is a Union?
64.Compare Structure and Union?
65.What are pointers?
66.How pointers variables are declared?
67.What do pointer variables contain?
68.How do we access value pointed to by a pointer variable?
69.What can be assigned to a pointer variable?
70.what operations can be performed on pointer variables?
71.Compare pointers and arrays?
72.What is a NULL value?
73.What operations are not allowed on pointer variables?
74. What is preprocessor?
75. What is # include statement?
76. What is # define or symbolic constant statement?
      What is a macro substitution?
77. What is conditional compilation in preprocessor?
78. What is a file ?
79. What are the various input output file operation functions? (Ans : fopen()…….. etc)
80. What are bit level programming operators? ( Ans : logical- and, or, exclusive or, Shiftleft, shiftright  etc)
81. What are .h files and what they contain? (Ans : stdio.h, conio.h, math.h, string.h,type.h etc)



MS Office - VIVA QUESTIONS

1.      What is input unit ? List various input devices.
2.      What is output unit ? List various output devices.
3.      What are the parts of a computer?
4.      What is a hardware?
5.      What is a software?
6.      What is CPU and its functions?
7.      What are primary and secondary memory?
8.      What are ROM and ROM?
9.      What is  Operating System(OS)?
10.  What are the types of OS?
11.  What are the functions of OS?
12.  What is DOS operating system?
13.  What are internal DOS commands?
14.  What are external DOS commands?
15.  What are wild card characters?
16.  What  is windows operating system?
17.  What is Desktop?
18.  What are Files and Folders?How to create,move and rename a folder.
19.  What is a Task Bar and their parts?
20.  What is an icon?
21.  What is Recycle Bin?
22.  What is a Control Panel?
23.  What is a word processor?
24.  What are the different parts of MS WORD window?
25.  What is a Wizard?
26.  What is a Style?
27.  What is a Template?
28.  What is a Format Painter?
29.  What is a Macro?
30.  What is Mail Merge?
31.  What is Spell and Grammar check?
32.  What is Header and Footer?
33.  What is Find and Replace? Shortcut keys.
34.  Different views of Word document (Document view).
35.  What are Cut, Copy and Paste? Shortcut keys.
36.  What are Undo and Redo? Give shortcuts.
37.  What are alignment and indention of text?
38.  What ere the various Formatting options?
39.  What is Bullets and Numbering?
40.  What are Bookmark, Foot note, Comment?
41.  What is a Table?
42.  What are the different parts of Power point Window?
43.  What is a Auto Content Wizard and Design Template?
44.  What are different slide views in Power point?
45.  What is Hyperlink?
46.  What is the shortcut key for printing?
47.  What is the difference Custom Animation and Slide Transition?
48.  What is Spread sheet (or) Worksheet?
49.  What is MS Excel used for?
50.  What are the different parts of MS Excel window?
51.  How many number of Rows and Columns a spread sheet contains?
(Ans :  rows-65536, columns-256)
52.  How is a Cell referred? (Ans : column name followed by row number)
53.  How many modes/types of data can be entered in a cell? (Ans : labels(Text),values(number) and Formulae)
54.  What is the difference between Absolute Referencing and Cell referencing?
55.  What is Auto Fill option in Excel?
56.  What are formulas and Functions? types.
57.  What is a Chart?
58.  What is sorting?
59.  What is MS Access Used for?
60.  Parts of MS Access window?
61.  What are different objects in Access?
62.  What are tables, Queries, Forms and reports?
63.  What is a Criteria(conditions)?