Monday, May 28

CUSAT Previous Questions with Answers- C programming.( S1 S2)





Hi Friends,


here I'm posting one of the frequently asking question in CUSAT B tech C programming ( s 1 s2 ) and its solution:

Question:



Write a C program which prints all Armstrong numbers between 1 and 1000.


Solution:



#include<stdio.h>
main()
{
int number, temp, digit=0, dup;

printf("Printing all Armstrong numbers between 1 and 500:\n\n");

number = 1;

while (number <= 500)
{
temp=0;
dup=number;
while(dup>0)
{
digit=dup%10;
temp+=(digit*digit*digit);
dup=dup/10;
}
if (temp==number)
{
printf("\nAmstrong Number:%d", temp);
}
number++;
}
getch();
}
 

Thursday, May 24

CIL Coal India MT Computer Science Previous Year Question with Answer



Hello reader,


In this post we shall go through some questions asked in CIL( Coal India Ltd)  MT Exam, with complete solution. Hope it will be useful to You. If you have  any feedback or doubts about any solution please  comment it here.!!! It will be helpful for others also.!!!


The order of an internal node in a B+ tree index is the maximum number of children it can have. Suppose that a child pointer takes 6 bytes, the search field value  takes 14 bytes, and the block size is 512 bytes. What is the order of the internal node?
A) 24 B) 25 C) 26 D) 27
 

Answer : (C)

The Boolean function x' y' + xy + x' y
A) x'+ y' B) x + y C) x + y' D) x' + y
Answer : (D)

In an MxN matrix such that all non-zero entries are covered in a rows and b columns. Then the maximum number of non-zero entries, such that no two are on the same row or column, is

A) £ a + b B) £ max {a, b} C) £ min {M-a, N-b} D) £ min {a, b}
Answer : (A)

The minimum number of page frames that must be allocated to a running process in a virtual memory environment is determined by
A) the instruction set architecture B) page size C) physical memory size D) number of processes in memory
Answer : (D)

The best data structure to check whether an arithmetic expression has balanced parentheses is a
A) queue B) stack C) tree D) list
Answer : (B)

 The address resolution protocol (ARP) is used for
A) Finding the IP address from the DNS
B) Finding the IP address of the default gateway
C) Finding the IP address that corresponds to a MAC address
D) Finding the MAC address that corresponds to an IP address
Answer : (D)

The goal of structured programming is to
A) have well indented programs
B) be able to infer the flow of control from the compiled code
C) be able to infer the flow of control from the program text
D) avoid the use of GOTO statements
Answer : (C)


Which data structure has the fastest insertion procedure?
A) Binary search tree
B) Ordered array
C) Heap
D) Unordered linked list
E) Ordered linked list

Answer: (D)

SQL is the combination of
A ) DDL and DQL
B ) DDL , DML and DQL
C ) DDL,DML,DQL and DCL
D ) None of these

Answer: (C)

Which of the following applications may use a stack?
A) A parentheses balancing program.
B) Keeping track of local variables at run time.
C) Syntax analyzer for a compiler.
D) All of the above

Answer: (D)

Which of the following is not a type of Operating System ?
(A) Multi-programming
(B) Time-sharing
(C) Real-time  
(D) Concurrent Programming

Answer : (D)

The mechanical, magnetic, electronic and electrical devices from which a computer is fabricated is called :
(A) Magnetic Core
(B) Firmware
(C) Hardware
(D) Software

Answer :  C

 The most efficient data-type for a variable that stores the number 4.6 e 20 is the _______ data-type.
(A) Character
( B) Float
(C) Long integer
(D) Short integer

Answer : B
 

Which of the following is a logical OR operator ?
(A) &&  
(B) ||
(C) ? :
(D) &

Answer : B


 Which of the following is not a valid declarations for a C++ character string ?

(A) char S[6] ;
(B) char S[6] = “Hello” ; 
(C) char * S ;
(D) char S[ ] ;

Answer : D

  A function’s single most important role is to :
(A) give a name to a block of code (B) reduce program size
(C) accept arguments and provide a return value  (D) help in organizing a program into conceptual units

Answer : D

 Which of the following 4-bit number equals its 2’s Complement ?
(A) 1010  
(B) 1000
(C) 0101
(D) 1100

Answer :  B

 The basic unit of measurement used for measuring opposition to current flow in a circuit is :
(A) volt
(B) ampere
(C) ohm
(D) watt

Answer :  C

 Programming in a language that actually controls the path of signals or data within a computer is called :
(A) Micro-programming 
(B) System programming
(C) Assembly programming
(D) Machine programming

Answer : A

 Which of the following is not a port/connection ?
(A) PS-2
(B) COM
(C) SMPS
(D) LPT

Answer : C



What is the output of the following code ?
for (int a = 1; a < = 1; a++) cout << a++; cout << a;

(A) 22 (B) 12 (C) 13 (D) 23

Answer : C

 Inheritance is a way to :
(A) organize data
(B) pass arguments to objects of classes
  (C) add features to existing classes without rewriting them
(D) improve data-hiding and encapsulation

Answer :  C

 What is a Constructor ?

  (A) A function called when an instance of a class is initialized
(B) Function that is called when an instance of a class is deleted
(C) A special function to change the value of dynamically allocated memory
(D) A function that is called in order to change the value of a variable

Answer :  A


Which of the following gives the value stored in pointer a ?
(A) a; (B) val(a);
  (C) *a;(D)  &a;
Answer :  C


Array passed as an argument to a function is interpreted as :
(A) Address of the array
(B) Value of the first element of the array
(C) Address of the first element of the array
(D) Number of elements of the array

Answer :  C

 Which of the following is the feature of stack ?
 (A) All operations are at one end 
(B) It cannot reuse its memory
(C) All elements are of different data types
(D) Any element can be accessed from it directly

Answer :  A

 What is the Postfix Expression for the following Infix (Inorder) expression ?

2*3-4/5
  (A) 23*45/-(B) 23*-45/
(C) 23*45-/ (D) *23/45-

Answer : A

 Binary search requires data to be in what order ?
(A) Increasing (B) Decreasing
(C) Random   (D) Sorted

Answer :  D


 You are making your own database so that you can organize information about your ‘Top 100’ movies. You want to include information like Title, Actor (s),Director, Year etc. Each record in your database will represent :

  (A) An actor (B) A director
(C) A year   (D) A movie

Answer :  D


 What will be a suitable criterion that should be entered for a query to search for Employee Names beginning with M ?
  (A) Start with M (B) Like M
(C) Like M*   (D) Like ‘M*’
  Answer :  D


A field that is a primary key in another table is called a _______ .
(A) special key   (B) foreign key

(C) simple key (D) composite key
Answer :  B


  This aggregate SQL function will return the number of rows in a database table :
  (A) COUNT (*)(B) Rows (*)
(C) NUM (*) (D) SUM (*)

Answer :  A

 Which topology requires a central controller or hub ?
(A) Mesh   (B) Star
(C) Bus (D) Ring

 Answer :  B


 In_______transmission, the channel capacity is shared by both communicating devices at all times :
(A) Simplex (B) Half-duplex
(  C) Full-duplex  (D) Half-simplex

Answer :  C

  ________is the protocol suite for the current Internet.
  (A) TCP/IP(B) NCP
(C) UNIX (D) ACM

Answer : A
  In C++, to write data containing variables of type float, to an object of type of stream, you should use :

(A) The insertion operator (B) seek ()
  (C) write ()(D) put ()

Answer : C

A message from device A consists of packet X and packet Y. In the virtual circuit approach to packet switching, packet Y’s path ____________ packet X’s.
  (A) is the same as(B) is dependent on
(C) is independent of (D) is always different from
  Answer :  A

There are n devices arranged in a ring topology. A device is deleted. There are now _____ links of cable.

  (A) n – 1  (B) n – 2
(C) n (D) n + 1
 Answer :  A

 Which factor makes twisted-pair cable superior to fiber-optic cable ?
(A) signal attenuation (B) noise resistance
(C) bandwidth range (  D) cost


Answer :  D



hAve  feedback? or doubts? please  comment it here.!!! It will be helpful for others also.!!!
- Thank You.!!!!



KERALA ENTRANCE ( ENGINEERING AND MEDICAL - KEAM) RESULTS ~ KNOW YOUR RANK



Hi reader,

 The result of Kerala Engineering & Medical Entrance  exam, one of the most prestigious competitive exams in Kerala, is supposed to be arrived, today (24-05-2012). The following links will help you to know  your result.

All the best wishes.!!!



Check it now.!!!!

http://www.cee-kerala.org/

http://www.cee.kerala.gov.in/keamresults2012/main/login.php








Monday, May 21

Generate Interesting Patterns Using C

Hi friends,

Look at the "+"  pattern generated by asterisks. Quite interesting na..!! :)
Lets have a look in a C program which generates exactly the same pattern.!!!!!

 main()
{
int i,j;
for ( i= 0; i < 11; ++i)
{
for ( j = 0; j < 11; ++j)
      if (j != 5 && i !=5 )
     printf(" "); 
      else printf ("* ");
printf("\n");
}
}



Saturday, April 28

SSC CHSL 2011 FINAL RESULT DECLARED



SSC CHSL 2011 FINAL RESULT DECLARED..!!!!
To know the final result please  check the following links..
All the very best dear SSC aspirants..!!  :)



http://ssc.nic.in/press-release/CHSL2011-SL.pdf

http://ssc.nic.in/press-release/CHSL2011-SL.pdf

http://ssc.nic.in/press-release/CHSL2011-SL.pdf

Thursday, April 26

Know Kerala SSLC Results 2012 - Made easy



Please try these links to get Kerala SSLC Examination Results 2012..!!!!


1. http://www.keralapareekshabhavan.in
2. http://www.results.kerala.nic.in
3. http://www.keralaresults.nic.in
4. http://www.kerala.gov.in
5. http://www.prd.kerala.gov.in
6. http://www.results.itschool.gov.in
7. http://www.manoramaonline.com
8.http://www.mathrubhumi.com


To get the result in your Mobile send SMS in the format
sslc<space>registration number
to the number 537252  




> SSLC/THSLC Results 2012 - - Likely to be announced on 26.4.2012 at 11:30 AM.

> In addition to Kerala SSLC examination result of THSLC, Special Schools, AHSSLC results will be published along with Kerala SSLC results 2012.



Tuesday, April 17

How Top Companies got their Name


Secrets behind Top Company Names --


-ADOBE-

This came from name of the river Adobe Creek that ran behind the house of founder John Warnock..

-APPLE COMPUTERS-

It was the favorite fruit of founder Steve Jobs. He was three months late in filing a name for the business, and he threatened to call his company Apple Computers if the other colleagues didn't suggest a better name by 5 O'clock that evening..


-CISCO-

It is not an acronym as popularly believed. It is short for San Francisco..


-COMPAQ-

This name was formed by using COMp, for computer, and PAQ to denote a small integral object..


-COREL-

The name was derived from the founder's name Dr. Michael Cowpland. It stands for COwpland REsearchLaboratory..


-GOOGLE-

The name started as a joke boasting about the amount of information the search-engine would be able to search. It was originally named 'Googol', a word for the number represented by 1 followed by 100 zeros. After founders- Stanford graduate students Sergey Brin and Larry Page presented their project to an angel investor, they received a cheque made out to 'Google' ...thus the name..


-HOTMAIL-

Founder Jack Smith got the idea of accessing e-mail via the web from a computer anywhere in the world. When Sabeer Bhatia came up with the business plan for the mail service, he tried all kinds of names ending in 'mail' and finally settled for hotmail as it included the letters "html" - the programming language used to write web pages. It was initially referred to as HoTMaiL with selective uppercasing..


-HEWLETT PACKARD-

Bill Hewlett and Dave Packard tossed a coin to decide whether the company they founded would be called Hewlett-Packard or Packard-Hewlett..


-INTEL-

Bob Noyce and Gordon Moore wanted to name their new company 'Moore Noyce'but that was already trademarked by a hotel chain so they had to settle for an acronym of INTegrated ELectronics..

-
LOTUS (Notes)-

Mitch Kapoor got the name for his company from 'The Lotus Position' or 'Padmasana'. Kapoor used to be a teacher of Transcendental Meditation of Maharishi Mahesh Yogi..


-MICROSOFT-

Coined by Bill Gates to represent the company that was devoted to MICROcomputer SOFTware. Originally christened Micro-Soft, the '-' was removed later on..


-MOTOROLA-

Founder Paul Galvin came up with this name when his company started manufacturing radios for cars. The popular radio company at the time was called Victrola..


-ORACLE-

Larry Ellison and Bob Oats were working on a consulting project for the CIA (Central Intelligence Agency). The code name for the project was called Oracle (the CIA saw this as the system to give answers to all questions or something such). The project was designed to help use the newly written SQL code by IBM. The project eventually was terminated but Larry and Bob decided to finish what they started and bring it to the world. They kept the name Oracle and created the RDBMS engine. Later they kept the same name for the company..


-SONY-

It originated from the Latin word 'sonus' meaning sound, and 'sonny' a slang used by Americans to refer to a bright youngster..


-SUN-


Founded by four Stanford University buddies, SUN is the acronym for Stanford University Network. Andreas Bechtolsheim built a microcomputer; Vinod Khosla recruited him and Scott McNealy to manufacture computers based on it, and Bill Joy to develop a UNIX-based OS for the computer..

-
YAHOO!-

The word was invented by Jonathan Swift and used in his book 'Gulliver's Travels'. It represents a person who is repulsive in appearance and action and is barely human. Yahoo! Founders Jerry Yang and David Filo selected the name because they considered themselves yahoos..