This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 11601. |
A tree in which, for every node, the difference between the height of its left subtree and right subtree is not more than one is (A) AVL Tree.(B) Complete Binary Tree.(C) B – Tree.(D) + B Tree |
|
Answer» Correct option- (A) AVL Tree. |
|
| 11602. |
A sorting technique which uses the binary tree concept such that label of any node is larger than all the labels in the subtrees, is called(A) selection sort.(B) insertion sort.(C) Heap sort.(D) quick sort. |
|
Answer» Correct option- (C) Heap sort. Explanation:- A Sorting technique which uses the binary tree concept such that label of any node is larger than all the, labels in the sub trees, is called Heap sort because heap sort works on a complete binary tree with the property that the value at any node 'N' of the tree should be greater than or equal to the value at all its children nodes. |
|
| 11603. |
Level of any node of a tree is(A) Height of its left subtree minus height of its right subtree(B) Height of its right subtree minus height of its left subtree(C) Its distance from the root(D) None of these |
|
Answer» Correct option - (C) Its distance from the root |
|
| 11604. |
Give any two characteristics of a good programming language. |
|
Answer» Two characteristics of a good programming language are: 1. It should support a large number of data types, built-in functions and powerful operators. In simple terms, a programming language should be robust, only then it can efficient and fast. 2. It should be portable means that programs written for one computer can be run on another with little or no modification. |
|
| 11605. |
Why ‘&’ operator is not used with array names in a scanf statement? |
|
Answer» In scanf() statement, the “address of” operator (&) either on the element of the array (e.g marks[i]) or on the variables (e.g &rate) are used. In doing so, the address of this particular array element is passed to the scanf() function, rather then its value; which is what scanf() requires. BUT many times the address of zeroth element (also called as base address) can be passed by just passing the name of the array. |
|
| 11606. |
Explain the following file functions. (i) fgetc( ) (ii) ftell (iii) fgets( ) (iv) rewind( ) (v) fseek |
|
Answer» (i)getc( ): reads a character from a file. This function is used to read a character from a file that has been opened in the read mode. For example, the statement c=getc(fp2); would read a character from the file whose file pointer is fp2. (ii)ftell( ): gives the current position in the file from the start. ftell takes a file pointer and returns a number of type long, that corresponds to the current position. For example:n=ftell(p); would give the relative offset n in bytes of the current position. This means that n bytes have already been read (or written). (iii)fgets( ): To read a line of characters from a file,we use the fgets() library function. The prototype is char *fgets(char *str, int n, FILE *fp);The argument str is a pointer to a buffer in which the input is to be stored, n is the maximum number of characters to be input, and fp is the pointer to type FILE that was returned by fopen() when the file was opened. (iv) rewind( ):sets the position to the beginning of the file. It also takes a file pointer and reset the position to the start of the file. For example: rewind(fp); n=ftell(fp); would assign 0 to n because file pointer has been set to the start of the file by rewind. (v)fseek( ):sets the position to a desired point in the file. fseek function is used to move the file position to a desired location within the file. For example: fseek(fp,m,0); would move the file pointer to (m+1)th byte in the file. |
|
| 11607. |
In _________ the difference between the height of the left sub tree and height of right sub tree, for each node, is not more than one(A) BST(B) Complete Binary Tree(C) AVL-tree(D) B-tree |
|
Answer» Correct option - (C) AVL-tree |
|
| 11608. |
Write a program in C to demonstrate the use of scope resolution operator. |
|
Answer» The scope resolutions operator is used to find the value of a variable out of the scope of the variable. Example: int i=10; main(){ int i =5; cout<<::i; cout<<i; } ::i refers to the value just before the scope (i.e.10). |
|
| 11609. |
Explain the different types of memory allocations in C. |
|
Answer» Different types of memory allocation function are: (i) malloc( ): It is a memory allocation function that allocates requested size of bytes and returns a pointer to the first byte of the allocated space. The malloc function returns a pointer of type void so we can assign it to any type of pointer. It takes the the following form: ptr= (cast type *) malloc(byte-size); where ptr is a pointer of type cast-type. For example, the statement x=(int *) malloc(10 *sizeof(int)) means that a memory space equivalent to 10 times the size of an int byte is reserved and the address of the first byte of memory allocated is assigned to the pointer x of int type. The malloc function can also allocate space for complex data types such as structures. For example: ptr= (struct student*) malloc(sizeof (struct student)); where ptr is a pointer of type struct student. (ii) calloc( ): It is another memory allocation function that allocates space for an array of elements, initializes them to zero and then returns a pointer to the memory. This function is normally used for requesting memory space at run time. It takes the following form: ptr= (cast type *) calloc(n,element-size); This statement allocates contiguous space for n blocks, each of size element size bytes. (iii) realloc( ): realloc is a memory allocation function that modifies the size of previously allocated space. Sometime it may happen that the allocated memory space is larger than what is required or it is less than what is required. In both cases, we can change the memory size already allocated with the help of the realloc function known as reallocation of memory. For example, if the original allocation is done by statement ptr= malloc(size); then reallocation is done by the statement ptr=realloc(ptr,newsize); which will allocate a new memory space of size newsize to the pointer variable ptr and returns a pointer to the first byte of the new memory block. |
|
| 11610. |
What is a linked list? List different types of linked list. Write a C program to demonstrate a simple linear linked list. |
|
Answer» Linked list: A linked list is a self referential structure which contain a member field that point to the same structure type. In simple term, a linked list is collections of nodes that consists of two fields, one containing the information about that node, item and second contain the address of next node. Such a structure is represented as follows: struct node { int item; struct node *next; }; Info part can be any of the data type; address part should always be the structure type. Linked lists are of following types: 1. Linear Singly linked list: A list type in which each node points to the next node and the last node points to NULL. 2. Circular linked list: Lists which have no beginning and no end. The last node points back to the first item. 3. Doubly linked list or Two-way linked list: These lists contain double set of pointers, one pointing to the next item and other pointing to the preceding item. So one can traverse the list in either direction. 4. Circularly doubly linked list: It employs both the forward and backward pointer in circular form. A program to demonstrate simple linear linked list is given below: #include < stdio. h> #include < stdlib . h> #define NULL 0 #define NULL 0 { int number; struct linked_list *next; }; typedef struct linked_list node; void main() { node *head; void create(node *p); int count(node *p); void print(node *p); clrscr(); head=(node *)malloc(sizeof(node)); create(head); printf("\n"); print(head); printf("\n"); printf("\n Number of items = %d \n",count(head)); getch(); } void create(node *list) { printf("Input a number\n"); printf("(type -999 to end) : "); scanf("%d",&list->number); if(list->number == -999) list->next=NULL; else { list->next=(node *)malloc(sizeof(node)); create(list->next); } return; } void print(node *list) { if(list->next!=NULL) { printf("%d - ->",list->number); if(list->next->next == NULL) printf("%d",list->next->number); print(list->next); } return; } int count(node *list) { if(list->next == NULL) return(0); else return(1+count(list->next)); } |
|
| 11611. |
Design an algorithm to generate nth member of the Fibonacci sequence. |
|
Answer» An algorithm to generate nth member of Fibonacci sequence is: 1. start 2. Scan the number ‘n’ upto which the series to be generated. 3. Initialize Sum=0, x=0, y=1 and i=3. 4. Print x and y as the part of series. 5. Repeat a-e until i<=n a. Calculate Sum=x+y b. Print Sum as part of series. c. Assign y to x d. Assign sum to y e. i=i+1 6. Stop. |
|
| 11612. |
Differentiate between pointers and arrays? Write a C program to display the contents of an array using a pointer arithmetic. |
|
Answer» Pointer and arrays: Pointers and arrays are very closely linked in C. Consider the following statements: int a[10], x; int *ptr; /* ptr is a pointer variable*/ ptr = &a[0]; /* ptr points to address of a[0] */ x = *ptr; /* x = contents of ptr (a[0] in this case) */ A pointer is a variable so we can do ptr = a and ptr++ ; while an array is not a variable so statements a = pa and a++ are illegal. A C program to display the contents of an array using a pointer arithmetic is listed below: //display the contents of an array using pointer #include < stdio. h > void main() { int *p,sum,i; static int x[5] = {5,9,6,3,7}; i=0; p=x; sum=0; clrscr(); printf("\nElement Value Address\n\n"); while(i<5) { printf(" x[%d] %d %u\n",i,*p,p); sum+=*p; i++; *p++; } printf("\n Sum = %d\n",sum); printf("\n &x[0] = %u\n",&x[0]); printf("\n p = %u\n",p); getch(); } |
|
| 11613. |
Given are two one dimensional arrays A and B which are stored in ascending order. Write a program to merge them into a single sorted array C that contains every element of A and B in ascending order. |
|
Answer» A program to merge two arrays into single sorted array that contains every element of arrays into a ascending order: #include<studio.h> #include<conio.h> void sort(int*,int); void merge(int*,int*,int,int); void main() { int a[10],b[10]; int i,j,m,n; clrscr(); printf("how many numbers u want to enter in 1st array : "); scanf("%d",&n); printf("enter numbers in ascending order :\n"); for(i=0;i<n;i++) scanf("%d",&a[i]); printf("how many numbers u want to enter in 2nd array : "); scanf("%d",&m); printf("enter numbers in ascending order :\n"); for(i=0;i<m;i++) scanf("%d",&b[i]); merge(a,b,n,m); getch(); } void merge(int *a,int *b,int n,int m) { int i=0,c[20],j=0,k=0,count=0; while(i<=n&&j<=m) { if(a[i]<b[j]) { c[k]=a[i]; i++; k++; } if(a[i]>b[j]) { c[k]=b[j]; j++; k++; } if(a[i]==b[j]) { c[k]=a[i]; k++; i++; j++; count++; } } if(i<=n&&j==m) { while(i<=n) { c[k]=a[i]; i++; k++; } } if(i==n&&j<=m) { while(j<=m) { c[k]=b[j]; i++; j++; } } for(i=0;i<m+n-count;i++) printf("%d\t",c[i]); |
|
| 11614. |
Write an algorithm to sort an arrays of integers using bubble sort technique. |
|
Answer» A C algorithm to sort an array using bubble sort technique void main() { int a[20],i,j,n,c,flag; printf("how many numbers u want to enter :\n"); scanf("%d",&n); printf("\nenter the numbers :\n"); for(i=0;i<n;i++) scanf("%d",&a[i]); for(i=0;i<n-1;i++) { for(j=0;j<n-1-i;j++) { if(a[j]>a[j+1]) { c=a[j]; a[j]=a[j+1]; a[j+1]=c; flag=0; } } if(flag) break; else flag=1; } printf("sorted elements :\n"); for(i=0;i<n;i++) printf("%d\t",a[i]); printf("\n"); } |
|
| 11615. |
How is multidimensional arrays defined in terms of an array of pointer? What does each pointer represent? |
|
Answer» An element in a multidimensional array like two-dimensional array can be represented by pointer expression as follows: *(*(a+i)+j) It represent the element a[i][j]. The base address of the array a is &a[0][0] and starting at this address, the compiler allocates contiguous space for all the element row-wise. The first element of second row is immediately after last element of first row and so on. |
|
| 11616. |
What is information technology? |
|
Answer» Information technology (IT) is the use of any computers, storage, networking and other physical devices, infrastructure and processes to create, process, store, secure and exchange all forms of electronic data. Typically, IT is used in the context of business operations, as opposed to technology used for personal or entertainment purposes. The commercial use of IT encompasses both computer technology and telecommunications. |
|
| 11617. |
What is UUID? |
|
Answer» A UUID – that’s short for Universally Unique IDentifier, by the way – is a 36-character alphanumeric string that can be used to identify information (such as a table row). Here is one example of a UUID: acde070d-8c4c-4f0d-9d8a-162843c10333 UUIDs are widely used in part because they are highly likely to be unique globally, meaning that not only is our row’s UUID unique in our database table, it’s probably the only row with that UUID in any system anywhere. (Technically, it’s not impossible that the same UUID we generate could be used somewhere else, but with 340,282,366,920,938,463,463,374,607,431,768,211,456 different possible UUIDs out there, the chances are very slim). |
|
| 11618. |
A set of libraries that provide programmatically access to some kind of graphics 2D function come under which software? |
|
Answer» A set of libraries that provide programmatically access to some kind of graphics 2D functions comes under the graphics package. |
|
| 11619. |
The menu bar is found at the ………. Of the LibreOffice window. a. Top b. Bottom c. Left side d. Right side |
|
Answer» a. Top The menu bar is found at the Top Of the LibreOffice window. |
|
| 11620. |
What encompasses of all technology that we use to create process and store information? |
|
Answer» Information technology (or IT) is a term that encompasses all forms of technology used to create, store, exchange, and use information in its various forms (business data, voice conversations, still images, motion pictures, photos, multimedia presentations, and other forms, including those not yet conceived). |
|
| 11621. |
Why are arguments used in functions? |
|
Answer» Arguments are the mechanisms that carry values from calling function to called function. |
|
| 11622. |
Mention the different parts of machine language instructions. |
|
Answer» The two parts of machine language instructions are opcodes and operand codes. |
|
| 11623. |
Define menu in a window. |
|
Answer» A menu is a collection of options that perform specific activities on document. |
|
| 11624. |
What do you mean by soft copy and hard copy? |
Answer»
|
|
| 11625. |
What is a filter in worksheet? |
|
Answer» A filter is an option that allows display of data of user’s choice, by hiding other non relevant data. |
|
| 11626. |
What are the inventions of Prof. John Napier and William Oughtred? |
|
Answer» Prof. John Napier invented a calculating device which is a set of 9 marked rods called “Napier Bones” and the device invented by William Ought red for computations is the “slide rule”. |
|
| 11627. |
What is the name of the machine developed by Blaise Pascal? |
|
Answer» Pascaline is the name of the machine developed by Blaise Pascal |
|
| 11628. |
Bihu dance is the folk dance of which Indian state?1. Arunachal Pradesh2. Assam3. Orissa4. Haryana |
||||||||
|
Answer» Correct Answer - Option 2 : Assam The correct answer is Assam.
|
|||||||||
| 11629. |
The Tropic of Cancer does not pass through which of the following states?A. RajasthanB. MizoramC. TripuraD. Manipur1. D2. A3. B4. C |
|
Answer» Correct Answer - Option 1 : D The correct answer is D.
|
|
| 11630. |
Which of the following is correctly matched?1. Mizoram: Molassis Basin2. Manipur: Loktak3. Tamil Nadu: Dodabeta Peak1. 1 and 2 only2. 2 and 3 only3. 1 and 3 only4. 1, 2 and 3 |
|
Answer» Correct Answer - Option 4 : 1, 2 and 3 The correct answer is 1, 2 and 3. Dodabeta Peak:
Molasses Basin:
Loktak Lake:
|
|
| 11631. |
In which of the following places is the Govardhan Math located?1. Puri2. Dwarka3. Sringeri4. Badrinath |
|
Answer» Correct Answer - Option 1 : Puri The Correct Answer is Puri.
|
|
| 11632. |
Which country has won the maximum number of Oscar awards to date in the category of foreign films?A. ItalyB. FranceC. JapanD. Spain1. A2. B3. C4. D |
|
Answer» Correct Answer - Option 1 : A The correct answer is Italy.
|
|
| 11633. |
Who is considered the world's first programmer?A. Alan TuringB. Ada LovelaceC. Tim Berners - LeeD. Steve Wozniak1.Alan Turing2. Ada Lovelace3. Steve Wozniak4. Tim Berners - Lee |
|
Answer» Correct Answer - Option 2 : Ada Lovelace The correct answer is Ada Lovelace.
|
|
| 11634. |
Which one of the following is not used to generate dynamic web pages?(a) PHP(b) ASP.NET(c) JSP(d) CSS |
|
Answer» The correct choice is (d) CSS The best I can explain: CSS alone cannot be used to generate dynamic web pages as it does not provide many event handling functions. It can be used along with JavaScript to generate dynamic web pages which are visually compelling. |
|
| 11635. |
A _______ is a collection of related web pages, images, videos or other digital assets that are addressed relative to a common Uniform Resource Locator, often consisting of only the domain name, or the IP address, and the root path in an Internet Protocol-based network. A. Web Writer B. Website C. Website Design D. Web Author |
|
Answer» B. Website A Website is a collection of related web pages, images, videos or other digital assets that are addressed relative to a common Uniform Resource Locator, often consisting of only the domain name, or the IP address, and the root path in an Internet Protocol-based network. |
|
| 11636. |
Imagine that you are Manu, Govt. High School, Channigepura. Write a letter to your father requesting him to send you Rs. 5,000 to provide food for 100 orphans on your birthday. |
|
Answer» Manasa Class X Section C Govt. High School Channigepura 15 May 2019 The Headmaster Govt. High School Channigepura Sub: Request for help to pay school fees Sir, I am writing this letter hoping that you will consider my request to help a needy girl in my class. Her name is Sukanya. She is a very bright student and my friend too. She comes from a very poor family. Unfortunately, because of the sudden demise of her father, she is in great trouble. Her mother earns some money doing odd jobs which is just sufficient to run the family. As such she is not in a position to pay the school fees and is thinking of withdrawing Sukanya from the school. I request you to save the career of this brilliant student, t will be happy if you could grant her fee concession or Rs. 5000 from the Poor Students’ Fund to help her pay the fees. Thanking you, Faithfully yours Manasa |
|
| 11637. |
Write a letter using the information given below : Imagine you are Rakesh / Raksha studying in Govt High School, Udupi and write a letter to the local government of your area, asking for their assistance in your efforts in keeping your school surrounding clean. |
|
Answer» 11 December 2019 From Udupi, Rakesh (class x), Govt High School, Udupi. To The Panchayath officer, Udupi taluk. Udupi. Respected sir, Sub : Seeking assistance to keep the school surroundings dean. I ‘am the student of government High school, Udupi. I am representing all the students of my school while writing this letter to you. We have a persisting problem regarding the unclean surroundings of our school. Though our teachers have encouraged us to clean our school surroundings once a week, our efforts are in vain as the households dump their garbage beside our school compound and the panchayat does not regularly lift the garbage. After a few days unpleasant smell starts emanating from the garabge mounds, have become a breeding ground for mosquitoes and their menance, dogs which come to scavenge on the garbage chase us menancingly and many students have been bitten by them. After the school hours, some anti – social persons carry out dubious activities inside the school premises. Liquor bottles, condoms, cigarette butts will be strewn about in the school premises. I earnestly plead with you to inspect and take action to stop these activities’ So that we can study in a more healthy and peaceful place. Thanking you. Yours faithfully, Rakesh (class x) Govt high school, Udupi. |
|
| 11638. |
Imagine you are Sandeep, studying in Xth Standard, Govt. High School, Kolar.Write a letter to your friend inviting him to attend your sister’s marriage. |
|
Answer» Govt. High School Kolar 1 July 2019 Dear Shankar, Are you surprised to receive this letter? If you are, I won’t be surprised. It is indeed a long time since I have written to you. Life has become so hectic that I don’t seem to be finding time for anything. But, this time, I have made time, to persuade you to attend my sister’s marriage. I’ve enclosed the invitation. You would have noticed that it’s on an important day – teacher’s day – and hence you cannot give me the excuse that you forgot the date. Mark the 5th of August on your calendar immediately. Geetha too joins me in inviting you to her marriage. You would remember the good times we spent together and the fun on the Raksha Bandhan day. She always complains that you used to be generous with your gifts and that I am miserly. Hope you won’t disappoint Geetha and me. Also make sure that you take at least three days leave. We have Mehendi function on the previous day and reception the next day. Nothing else to write. With love, Sandeep |
|
| 11639. |
Write a letter to your school Headmaster/ Headmistress seeking permission to avail 3 days’ leave to attend to your ailing grandfather. |
|
Answer» From XX 10th Std ABC School, Bangalore Date: ………….. To The Headmaster, ABC School, Bangalore Respected sir, Sub: Requisition letter for 3 days’ leave My grandfather has been admitted to hospital last week and his condition is said to be serious. Hence, I would like to apply 3 days’ leave to be next to him during his last days. Kindly oblige and grant me leave for three days i.e. from ..... to ..... Thanking you, Yours faithfully, XX, Signature. |
|
| 11640. |
Imagine you are a student of ABC Govt High School, Vijayanagar and you have passed out SSLC with distinction.Write a letter to the area Corporator expressing your wish to continue your education and seeking his guidance in availing financial assistance for the same as you are from a financially poor background. |
|
Answer» From XXX ABC School’ Vijayanagar Bangalore Date: ……………… To The Corporator Vijayanagar Bangalore Respected Sir, SUB: Requisition for financial assistance for studies I have passed my SSLC examination with distinction (92%) and I wish to continue my studies in a reputed college with science as a method. My parents are both construction workers who cannot afford the fee for my higher education. Hence, I request your good self to provide me with some kind of financial assistance so that I can pursue my dream of becoming a doctor. I assure you, my service will be for the needy of the society and shall repay the debts in future. Kindly oblige and do the needful. Thanking you, Yours faithfully, XXX. |
|
| 11641. |
Which is the earliest computing device? |
|
Answer» Abacus is the oldest computing tool. |
|
| 11642. |
Mrs. Janaki purchased a product through online and payment was given by credit card. She wants to protect the information about the credit card. How can it be possible from the following? (а) Security (b) Favorite (c) Media (d) Content |
|
Answer» (a) Security |
|
| 11643. |
Mr. Franco’s e-mail id is [email protected] He wants to connect this page fastly. From the following which will help him. (a) Favorite (b) Search (c) Refresh (d) Media |
|
Answer» (a) Favorite |
|
| 11644. |
What is meant by webpage, web site, web browser, URL, and TCP/IP? |
|
Answer» 1. A web page is a FITML document or resource of text, images, and videos that is suitable for the World Wide Web, whereas website is a collection of web pages. 2. Web browser is a software application program used to locate and display Web pages. The most popular browsers are google chrome, Microsoft Internet Explorer and Firefox. 3. URL is the global address of documents and other resources on the World Wide Web. For example, http://www.sarthaks.com /index.html 4. TCP is one of the main protocols in TCP/IP networks, whereas the IP protocol deals only with packets, TCP enables two hosts to establish a connection and exchange streams of data. TCP guarantees delivery of data and also guarantees that packets get delivered in the same order in which they were sent. |
|
| 11645. |
The education Dept, of Govt, of Kerala declared SSLC results and it is available on the internet your friend wants to save the result in his computer. Help him to do so. |
|
Answer» To save the result in his computer to a file by using the ‘save’ or ‘save as’ option of the file menu. When click this option a dialog box will appear then specify the folder whereas the file has to be saved using the dialog box and click OK. To save an image right click on the image, a pop-up menu will appear then choose the save option give a name and press OK. |
|
| 11646. |
Mr. Franco’s e-mail id is [email protected] He wants to connect this page fastly. From the following which will help him. (a) Favorite (b) Search (c) Refresh (d) Media |
|
Answer» (a) Favorite |
|
| 11647. |
Mr. Asokan wants to go the previous page. From the following which option will help him? (a) Back button (b) Refresh (c) Favorites (d) Stop |
|
Answer» (a) Back and forward button |
|
| 11648. |
The protocol for internet communication is ........ |
|
Answer» TCP/IP protocol |
|
| 11649. |
How can it possible to understand that the browser is retrieving data? (a) Access indicator icon animates (b) From the refresh button (c) From the back button (d) None of these |
|
Answer» (a) Access indicator icon animates |
|
| 11650. |
You wish to visit the website of your school. Name the software required. Which software is available with Windows for this purpose? Give names of other such software. |
|
Answer» Browsing software or Browser. The browsers are: 1. Netscape Navigator 2. Internet Explorer 3. Mozilla 4. Opera 5. Mosaic etc. |
|