Thursday, November 25, 2010

sum of n numbers -C

int main(void)
{
int sum=0,n=0;
printf("\n how many numbers do u want to add);
scanf("%d",&n);
for(int i=0;i
{
printf("\n Enter a number");
scanf("%d",&i);
sum=sum+i;
}
printf("\nSum=%d",sum);
return 0;
}

Tuesday, November 23, 2010

Unit wise Foc question bank PART A,B


                                                                              Unit-I

PART A
1. Define Computer?
2. What are the basic operations of Computer?
3. List out any 5 characteristics of Computer?
4. What is an Information Technology?
5. Who is the Father of Computer?
6. What are the Major Components of I and II generation Computers?
8. Define CPU and ALU?
9. Expand SMPS, RAM, ROM, BIOS.
10. Define Bit, Byte, and Nibble?
11.Define an Integrated Circuit
12.What are the Applications of computers?
13.Define MSB and LSB.
14. Define Binary Number System.
15. Define Decimal Number System.
16. Define Octal Number System.
17. Define Hexadecimal Number System.
18.Define 1’s complement and 2’s Complement
19.Convert the Following binary Number to Decimal
     1) 111001 2) 00101 3) 101110 4) 110010
20. Convert the following Hexadecimal to Decimal
     1) 93A  2) 6BA  3) 3B9  4) 28D
21. Convert the following Octal and Decimal.
      1) 773 2) 7373 3) 1267 5) 6347
22. Convert the following Decimal to Hexadecimal.
      1) 7793 2) 2389 3) 2079 4) 676
23. Convert binary real number to its equivalent binary number.
24. Differentiate between primary and secondary memory
25. What are the five basic operations of computer?
26. Define Software and its 2 types?

Part B

1. (a)Explain about the Block Diagram of the Computer in Detail. (8)
(b) What are the characteristics of Computer? (8)
2. Explain in detail About the Components of Computer System. (16)
3. List out the Features of al generations of computer with their advantages and
disadvantages. (16)
4. Write a note on classification of Computers. (16)
5. Explain the various applications of Computer in detail. (16)
6.(a) Convert the Decimal Number 4019 to Hexadecimal Number (8)
   (b) Convert the Decimal Number 250 to Octal Number
7.  (a) Subtract the binary number 100 from 001 using 1’s Complement Method (4)
     (b) Convert the Decimal Fraction 250.3125 to Binary Number (8)
     (c) Subtract the hexadecimal number 0B from C3 (2)
      (d) Convert (5C2 )16 to Decimal Number (2)

8.(a)Convert Hexadecimal Number AC5.4D to Octal Number (8)
    (b)Convert the Binary Number 11110.11011 to Hexadecimal Number (8)
9.(a)Convert the Hexadecimal Number 5C8 to Binary Number (8)
    (b)Convert the Octal Number 540 to Binary Number (8)
10. Describe the evolution of computers.
11. Explain in detail about Storage Devices. (16)
12. (a)Explain briefly about Characteristics of Storage. (8)
      (b)Explain about Secondary Storage Devices. (8)
13. Explain briefly about Magnetic Storage Devices. (16)
14. Explain briefly about Optical storage Devices. (16)
15. Explain about Input devices in detail? (16)
16. List out the Types of Computer Monitors and Explain in detail. (16)
17. List out the key hardware and software technologies used in building the computer of each of the five generations.
                                        

                                                       






Unit-II

Part A
  1. Define CPU.
  2. Define Control Unit and ALU.
  3. Define Primary Storage and its Components.
  4. Define Dynamic Memory.
  5. Define Secondary
  6. What are the types of Input Devices?
  7. Define about the Monitors and its types
  8. Define Hardware and Software.
  9. What are the types of Software?
10.  What is the Application of Software?
11.  Define operating System and its Functions.
12.  Define Compiler, Interpreter and Assembler.
13.  What are the functions of System utilities?
14.  What are the types of Operating System?
15.  What are the Categories of Operating System?
16.  Define Application Program.
17.  What are the types involved in Graphics File Formats?
18.  What is called Protocol?
19.    Define LAN, MAN, WAN.
20.  List out any four services provided by Internet.
  1. 21.Distinguish between compilers and interpreters.
Part B
1. Define Hardware and Software and its types. (16)
2.What is application software? Describe briefly some of the most commonly known types of application 
    software.(16)
3. Explain the steps involved in software development. (16)
4.  Name some of the basic services provided by the internet. Explain how each of these services helps the  internet users. (16)
5. Describe the evolution of internet in detail.(16)
   6.Explain about the system software and its importance.
   7.Explain the relationship among the hardware, system software, application software and    
     the users of a computer system.
   8.Describe briefly any six application software.

                                                    Unit III

1. Define Program.
2. Define Algorithm.
3. How can you measure the quality of Algorithm?
4. What is a decision Table?
5. What is a Flowchart?
6. What is need for flowchart symbols?
7. What is “Pseudo code”?
8. What is Sequence Logic?
9. What is Selection Logic?
10. What is Iteration Logic?
11. Draw a flow chart to find maximum of the given three numbers.
12. State the uses of spread sheet.
13.Enumerate various steps involved in software development.
14.Write the advantages of flow chart.
15.What are te basic logic structure used in writing structured program
16.What are the characteristics necessary for a sequence of instructions to qualify as an        
     algorithm.
17.What is a CAD system? List out its typical users.
18.Draw a flow chart to find the sum of n natural numbers

                                                                  Part B

1.Describe briefly about Flowchart and its types. (16)
2. (a)Describe briefly about the advantages of Flowcharts. (8)
    (b)Describe Pseudo code with its Advantages and Disadvantages. (8)
3.a)Describe the features of word processor package in detail.(8).
   b)Describe the main feature of graphic packages(8)
4.a)What is spreadsheet packages? draw a sample spread sheet for any application.(8)
   b)What is a graphic software? Describe the key features supported by modern graphics      
       packages.(8)
5.What are the various guidelines to be followed while drawing a flowchart? Discuss the  
        advantage and limitation of flow charting.(16)
6. (i) Witth a neat flow chart explain the division algorithm(8)
     (ii) Explain the various steps involved in  the software development.(8)
7. (i)What are te various guidelines to be followed while drawing a flow chart?Discuss the advantages and  
        limitations of flow charting(8)
    (ii) What do you mean by pseudo code? Write the pseudo code to add up all even numbers between 0  
          and 100.(8)
8. (i)Draw a flow chart to find a factorial of a given number.(6)
     (ii) Write algorithm to find te sum of the following series.
               1+5+9+13+….20                                                              (8)
9.Write the algorithm, draw the flowchart, and write the pseudocode for the following.
1.      To find the area of a rectangle
2.      To find the area of a circle
    1. To find the circumference of a circle
    2. To find the centigrade value for the corresponding Farenheit value
    3. To find the Farenheit value for the corresponding centigrade value
    4. To find the sum and product of two given values
    5. To find whether the given year is leap year or not
    6. To find the largest of two numbers
    7. To find the largest of three numbers
    8. To find whether the given no is positive or not
    9. To find whether the given no is odd or even
    10. To find the factorial of  a given no
    11. To find the sum of all the digits in a given no
    12. To find whether the given no is Armstrong or not
    13. To find the reverse of a given no
    14. To calculate 1+2+3+……n
    15. To calculate 12+22+32+….+n2
                                            
             Unit IV & V
  1. What are Keywords?
  2. What is an Operator and Operand?
  3. What is Ternary Operator?
  4. List out any 5 Features of “C” Applications.
  5. What are the Characteristics of Program?
  6. Define C Tokens and its types.
  7. Define Identifiers and Keywords.
  8. What are the Data Types and its types?
  9. What is a Variable?
  10. Define Constants and its Types.
  11. Define Operators and its types.
  12. What are the types involved in I/O Operators?
  13. Define Decision-making and its types.
  14.  Define Branching and its types.
  15. Define Looping and its Types
  16. Define Arrays and also its types.
  17. List out any 10 String Functions in a “C” Compilers.
  18. Define Function and its types.
  19. What are the Elements of User-Defined Functions?
  20. Define Parameters and its types.
  21. What is called Recursion
  22. List out any 10 Library Functions of C Header Files.
  23. Define Structures.
  24. Define Union.
  25. Define Pointers.
  26. What are the Features of Pointers?
  27. What are the Advantages of Pointers?
  28. Define Null Pointer.
  29. Define Dynamic Memory Allocation (DMA).
  30. What are the Advantages of DMA? 
  31. Define “C” Preprocessor. 
  32. Define Macro Substitutions.
  33. What are the rules for defining Preprocessor?
  34. Specify the Header files in “C” language.
  35.  What re the Preprocessor Directives?
  36.  What is Global Variable?
  37.  What is Conversion Specification?
  38.  What is the difference between Library Functions and User-Defined Function?
        39.If a=50,b=10 and c=20 evaluate the complex expression  
               c+= (a>0 && a<=10)? ++a : a/b

        40.Give  the meaning of the following functions:
a)    floor(d)
b)     fmod(d1,d2)
c)     pow(d1,d2)
d)    ceil(d)
         41.Write the output of the program
                      main()
                       {
                          int i=0,x=0;
                          while(i<20)
                       {
                           If(i%5==0)
                           {
                              x+=i;
                            printf(“%d”,x);
                           }
                        i++;
                        }
                      printf(“%d”,x);
                     }
         42. Define enumerated data type.
         43.Differentiate between relational & logical expression
         44.State the meaning of the following keywords in C: auto, double, int long
         45.Differentiate between local and global variable.
         46What is the use of malloc() and free().
         47.Give the syntax of conditional operator in C.
         48.Differentiate between break and continue statement in C.
         49.Differentiate between union and structure in C.
        50.Define pointer.
 51.Differentiate between getchar() and  scanf() in reading a string.
        52.What are the character test functions?
       53.what is the difference between ‘a’ and “a”
Part B
1. Describe briefly about the Structure of a “C” Program, and explain each section
     Briefly. (16)
 2. (a) Describe briefly about the Decision Making and its Types. (8)
     (b)Describe briefly about the Branching and its types. (8)
 3. Describe briefly about the Looping and its types, with an example program. (16)
 4. Describe about the Switch Statement and its types, with example programs. (16)
 5. Describe briefly about the Arrays and its Types. (16)
 6. Explain in briefly about pointers with example. (16)
 7. Give Comparison between call by value and call by reference with an example Program (16)
 8. (a) Explain in detail about Preprocessor (8)
     (b) Explain in detail about the user define functions. (8)
9.  (a)Differentiate between operator & operand .Describe the various types of operator(8)
     (b)Compare while and do-while with example(8)

10.(a)What are the various operator supported by c with example(8)
     (b)Describe the features of primary datatypes and user defined data type(8)
11.Write a C program to find the sum of two numbers.
12. Write a C program to find the average of three float numbers.
13. Write a C program to swap two numbers using third variable.
14.  Write a C program to swap two numbers without using temporary variable.
15.  Write a C program to find the area and circumference of a circle.
16.  Write a C program to find the biggest of two numbers using ternary operator.
17.   Write a C program to convert centigrade to Fahrenheit.
18.   Write a C program to convert Fahrenheit to centigrade.
19.   Write a C program to calculate the simple interest.
20.   Write a C program to find the area of a rectangle.
21.   Write a C program to find Fibonacci series.
22.  Write a  C program to verify given number is palindrome or not
23. Write a C program to compute factorial of a number.
24.(i)Describe the different types of operators available in C with example.(12)
           (ii)What is a preprocessor in C language with example.(4)
    25. (i) Write a C program for factorial for a given number(8)
           (ii)Describe the features of primary data types and user defined data type in C.(8)      
   26. Explain the storage classes with example.(16)
   27. Write in detail about decision making Statements with example.(16)


final FOC question bank part A


                                          FOC Question bank part A
  1.     Define a computer.
  2.     What are the basic operations of Computer?
  3.     List out any 5 characteristics of Computer?
  4.     Define CPU and ALU?
  5.     What are the advantages of transistors over vacuum tubes?
  6.     State any four characteristics of first generation computers.
  7.     State any four characteristics of second generation computers.
  8.     State any four characteristics of third generation computers.
  9.     State any four characteristics of fourth generation computers.
  10.  State any four characteristics of fifth generation computers.
  11.  Define an IC.
  12.  What is a transistor?
  13.  Which computer is known as PC?
  14.  Which computer is known as notebook? Why?
  15.  Which computer is known as palmtop? Why?
  16.  What are the advantages of secondary storage over primary storage?
  17.  What are the functions performed by Input unit?
  18.  What are the functions performed by output unit?
  19.  What are the functions performed by control unit?
  20.  What are the functions performed by storage unit?
  21.  What are the functions performed by arithmetic and logic unit?
  22.  What is CPU? What are the subsystems in it?
  23.  Define software. What are the categories of software?
  24.  What is system software?
  25.  What is an operating system? Give one eg.
  26.  Differentiate between machine language and high level language.
  27.  Difference between compiler and interpreter.
  28.  What are system utility programs?
  29.  What is application software? List out some of the application software.
  30.  List out any four features of word processors. Give one eg.
  31.  List out any four features of spreadsheets. Give one eg.
  32.  List out any four features of DBMS. Give one eg.
  33.  List out any four features of presentation applications. Give one eg.
  34.  What is freeware?
  35.  What is a firmware?
  36.  Define software piracy.
  37.  Enumerate the steps involved in program development cycle
  38.  What is the internet? How did it evolve
  39.  What are the types of Input Devices?
  40.  Define about the Monitors and its types.
  41.  What is a base of number system?
  42. Determine the binary equivalent of (36)10
  43. Determine the octal equivalent of (359)10
  44. Determine the hexadecimal equivalent of (5112)10
  45. Determine the decimal equivalent of (11010)2
  46. Determine the decimal equivalent of (456)8
  47. Determine the decimal equivalent of (B14)16
  48. Determine the octal equivalent of (10111)2
  49. Determine the hexadecimal equivalent of (11001011)2
  50. Determine the binary equivalent of (231)8
  51. Determine the binary equivalent of (5AF)16
  52. Determine the hexadecimal equivalent of (2327)8
  53. Determine the octal equivalent of (2B6)16
  54. Perform binary addition for the numbers 1010 & 1111
  55. Subtract the binary number 101 from 1111
  56. What is the ones complement of 1010?
  57. subtract 1010 from 1000 using ones complement method
  58. What is the twos complement of 1010?
  59. subtract 1010 from 1000 using twos complement method
  60. Explain the difference between “downloading” and “uploading “of information.
  61. What is ARPANET?
  62. What is a newsgroup? How is it useful?
  63. What is hypertext? How is it useful?
  64. Explain a typical structure of URL.
  65. What is the use of telnet service offered by internet?
  66. What is FTP?
  67. Define the terms online and offline.
  68. What are the 5 elements that are common to all video conferencing endpoint?
  69. Give the full form of FTP, WWW, HTML, HTTP,Web server,Web browser,Webpage, Website,Homepage,ISP,URL, TCP/IP, ISDN, and DSL.
  70. Define  an algorithm  
  71. What is a flowchart?
  72.  What are the various basic symbols used in flowcharting? Give their pictorial representation.
  73. Describe the function of various basic flowcharting symbols.
  74. List out any some of the guidelines used for preparing flowcharts.
  75. What are the benefits of flowcharts?
  76. What are the limitations of flowcharts?
  77. Define a pseudocode.
  78. List out any some of the guidelines used for writing pseudocode.
  79. What are the benefits of pseudocode?
  80. What are the limitations of pseudocode?
  81. What are control structures?
  82. What are the three basic logic structures used in writing structured programs? Discuss the use of each.
  83. What is a sequence control structure?
  84. What is a selection control structure?  
  85.  Define Hardware and Software.  
  86. What are the types of Software?  
  87. What is the Application of Software?  
  88.  Define operating System and its Functions.   
  89.  Define Compiler, Interpreter and Assembler.
  90. What are the functions of System utilities?
  91. What are the types of Operating System?   
  92. What are the Categories of Operating System?   
  93. Define Application software/program 
  94. What are the Different data types available in “C”?
  95. What are Keywords?
  96. What is an Operator and Operand?
  97. What is Ternary Operator?
  98. List out any 5 Features of “C” Applications. 
  99. What are the Characteristics of Program?
  100.    Define C Tokens and its types.
  101.    Define Identifiers and Keywords.
  102.   What are the Data Types and its types?
  103.   What is a Variable?
  104.   Define Constants and its Types.
  105.   Define Operators and its types.
  106.   What are the types involved in I/O Operators?
  107.   Define Decision-making and its types.
  108.   Define Branching and its types.
  109.   Define Looping and its Types.
  110.   Define Arrays and also its types.
  111.   List out any 10 String Functions in a “C” Compilers.
  112.   Define Function and its types.
  113.  What are the Elements of User-Defined Functions?
  114.     Define Parameters and its types. 
  115.   What is called Recursion?
  116. List out any 10 Library Functions of C Header Files.
  117.  Define Structures.
  118.   Define Union.
  119.   Define Pointers.
  120. What are the Features of Pointers?
  121. What are the Advantages of Pointers?
  122.  Define Null Pointer. 
  123.  Define Dynamic Memory Allocation (DMA).
  124. What are the Advantages of DMA?
  125.  Define “C” Preprocessor.
  126.   Define Macro Substitutions.
  127.    What are the rules for defining Preprocessor?
  128.   Specify the Header files in “C” language.
  129.  What re the Preprocessor Directives