Friday, 31 July 2020

Answer : IT Tools and Business Systems (January 2019)


Q. 5 (A) : Explain about Multitasking operating system in detail.

Answer :


Multitasking, in an operating system, is allowing a user to perform more than one computer task (such as the operation of an application program) at a time. The operating system is able to keep track of where you are in these tasks and go from one to the other without losing information. Microsoft Windows 2000, IBM's OS/390, and Linux are examples of operating systems that can do multitasking (almost all of today's operating systems can). When you open your Web browser and then open Word at the same time, you are causing the operating system to do multitasking.

Saturday, 25 July 2020

Descriptive Question Answer NIELIT (O-Level ) IT Tools and Business Systems (July 2019)



Answer IT Tools and Business Systems (July 2019)

Q 5 (A) . Define Computer. Explain the main characteristics of Computer.

Answer :

Computer

A computer is an electronic device that manipulates information, or data. It has the ability to store, retrieve, and process data. You may already know that you can use a computer to type documents, send email, play games, and browse the Web. You can also use it to edit or create spreadsheets, presentations, and even videos.

Thursday, 23 July 2020

Dynamic Memory allocation | Input | Print Ascending Order program | C Language

 Q : Write a program using dynamic memory allocation to read numbers as input and display them in sorted order thereafter.

Answer :


#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
/*============================
     Girfa Student Help
     Dynamic array and ascending print
==============================*/
void main()
{

Wednesday, 22 July 2020

String Concatenation without library function | C Language

Q : Write a program to concatenate two strings. (Do not use inbuilt string function).


Answer : 



#include<stdio.h>
#include<conio.h>
/*============================
     Girfa Student Help
     Concatenation string
==============================*/

Find Largest number from array using function program | C Language

Q : Write a program to input a set of numbers into an array. Pass the array to a function that finds and display the  largest number.?


Answer : 



#include<stdio.h>
#include<conio.h>
/*============================
     Girfa Student Help
     Find largest no. in array using function
==============================*/
void find(int ar[5]);

Tuesday, 21 July 2020

Structure record input-read in file | C Langauge

Q : Write a program to write records of students in a file, where each record consists of student name, roll number, CGPA, and address. Read the records back from the file and display them.

Code : 

#include<stdio.h>

#include<conio.h>

/*============================

     Girfa Student Help

     Structure write back to file

==============================*/

Full Pyramid program | C Language

Full pyramid program and size is given by user



Code :


#include<stdio.h>
#include<conio.h>
/*============================
     Girfa Student Help
     Full pyramid program
==============================*/

Monday, 20 July 2020

Table multiplication of given number

Q : Write program to generate multiplication table for first ‘n’  number, where ‘n’ is a user input.


Answer : 



#include<stdio.h>
#include<conio.h>
/*============================
     Girfa Student Help
     Multiplication table of given number
==============================*/

Sunday, 19 July 2020

Extern Variable



External variables are used to make global variables. Extern variable defined outside the function. These variables are available globally throughout the function execution. The value of global variables can be modified by the functions. “extern” keyword is used to declare and define the external variables.

Cookies PHP


A cookies is a variable set on server normally used to identify a user.  A cookie is a small file that the server embeds on the user's computer. Each time the same computer requests a page with a browser, it will send the cookie too. A cookie can only be read from the domain that it has been issued from.


Syntax 

setcookie(name, value, expire, path, domain, secure, httponly);


  1. Name: It is used to set the name of the cookie.
  2. Value: It is used to set the value of the cookie.
  3. Expire: It is used to set the expiry timestamp of the cookie after which the cookie can’t be accessed.
  4. Path: It is used to specify the path on the server for which the cookie will be available.
  5. Domain: It is used to specify the domain for which the cookie is available.
  6. Security: It is used to indicate that the cookie should be sent only if a secure HTTPS connection exists.

Saturday, 18 July 2020

Macro C Language

 What is macro? Define a macro to compute maximum of two arguments passed to it.



macro is a fragment of code which has been given a name. Whenever the name is used, it is replaced by the contents of the macro. There are two kinds of macros. They differ mostly in what they look like when they are used. Object-like macros resemble data objects when used, function-like macros resemble function calls.
#include <stdio.h>

#define MAX(x,y) ((x>y)?x:y)
/*=======================
     Girfa Student Help
     Macro Demo
 ========================*/

fseek demo program

Q : Write a file statement to place a file pointer (fp) at the beginning of the record number (say R), where record size is B bytes.


Answer : 

#include<stdio.h>

#include<conio.h>

/*============================

     Girfa Student Help

     fseek demo

==============================*/

Friday, 17 July 2020

Structure for Employee

A programmer wants to use two variables session and info. Variable session can take three values (morning, afternoon, evening) ly. Using variable info, the programmer wants to access information empname and empid of 30 employees. Name the appropriate data type used for each variable session and info and declare the variables.

Answer : 



#include<stdio.h>
#include<conio.h>
/*============================
     Girfa Student Help
     structure data type
==============================*/

Difference and similarity between continue and break | C Language

Write down one similarity and one dissimilarity between break and continue statements.


Similarity


The main difference between break and continue statements in C language is that a break origins the innermost enclosing loop or switch to be exited immediately. Whereas, the continue statement origins the next iteration of the enclosing for, while, or do loop to begin. The continue statement in while and do loops takes the control to the loop's test-condition immediately, whereas in the for loop it takes the control to the increment step of the loop.

Thursday, 16 July 2020

Min Max find program 2d-array using function | C Language

Q : Write a function fnmat() which takes matrix, m, n as arguments where matrix is of size mXn with m as rows and n as columns. Function should return the maximum and minimum elements of the matrix. Elements of matrix are of integer type.


Answer : 


#include<stdio.h>
#include<conio.h>
#define ROW 5
#define COL 5
/*============================
     Girfa Student Help
     Find max,min 2d-array using function
==============================*/
void fnmat(int ar[ROW][COL],int,int);
void main()
{
     int ar[ROW][COL],r,c,i,j;
     clrscr();
     printf("Enter row & columns for array entry>> ");
     scanf("%d%d",&r,&c);
     if(r>ROW)
           printf("Given row is greater than row capacity of %d",ROW);
     else if(c>COL)
           printf("Given column is greater than column capacity of %d",COL);
     else
     {
           for(i=0;i<r;i++)
           {
                for(j=0;j<c;j++)
                {
                     printf("Enter number for ar[%d][%d]>> ",i+1,j+1);
                     scanf("%d",&ar[i][j]);
                }
           }
           clrscr();
           /* Printing array */
           for(i=0;i<r;i++)
           {
                for(j=0;j<c;j++)
                     printf("\t%d",ar[i][j]);
                printf("\n");
           }
           fnmat(ar,i,j);
     }
     getch();
}
void fnmat(int ar[ROW][COL],int r,int c)
{
     int i,j,min,max;
     min=max=ar[0][0];
     for(i=0;i<r;i++)
     {
           for(j=0;j<c;j++)
           {
                if(min>ar[i][j])
                     min=ar[i][j];
                else
                     max=ar[i][j];
           }
     }
     printf("\n\n\tMix=%d\n\tMax=%d",min,max);
}


POW function | C Language

Q : Write a function fnpow() in C to compute xy where x is float and y is integer. Function will return the result and takes x, y as arguments.

Answer :

#include<stdio.h>
#include<conio.h>
/*============================
     Girfa Student Help
     User defined pow function
==============================*/

Wednesday, 15 July 2020

Difference between Union & Structure


SN.
Structure
Union
1
Struct keyword is used to make structure variable
Union  keyword is used to make structure variable
2
Structure is user defined data type which is used frequently to represent real word data type presentation.
Union is also a user defined data type which is used to achieve specific need.
3
Structure allocates memory for its all member.
Union allocates memory only for the biggest data member.
4
All member data can be hold at same time in a structure variable.
Only one data from member can be hold at a time.
5
Several members can be initialized at ones.
Only first member can be initialized.


Tuesday, 14 July 2020

File writing program append mode using Command Line Argument

Q : Write a program using command line parameters to append one text file to another text file.?


Answer : 



#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
void main(int argc,char *argv[])
{
     FILE *infile,*outfi

Monday, 13 July 2020

Bitwise Operator Complete solution

Bitwise operators are used to perform bit operations. Decimal values are converted into binary values which are the sequence of bits and bit wise operators work on these bits. Bit wise operators in C language are given below.

1. & (bitwise AND)
2. | (bitwise OR) 
3. ~ (bitwise NOT)
4. ^ (XOR)
5. << (left shift) 
6. >> (right shift).

Link List Disadvantage


  • If fix element is required for an operation then link list is not a good option because it’s consumed more memory to manage the dynamic address for the list.
  • Random traversal is not possible in link list due to dynamic memory allocation which is unpredictable and scarred in memory.
  • Reverse traversing is not possible in a single link list because only the next pointer is used to point next element.
  • Manual delete is required because link list uses memory in heap section.
  • Infinite traversal occurred in a circular list if not handled properly.
  • More Time and memory required compare to array.

Pointer and Array Relationship


Pointers and arrays have a special relationship in C Language.Name of an array is constant pointer which point first element of array and an array is represented by a variable that is associated with the address of its first storage location. A pointer is also the address of a storage location with a defined type, so name permits the use of the array [ ] index notation with both pointer variables and array variables. For example, the following two references in C language are equivalent in meaning:

Q = &a[0];                                                           trace(Q[2]);
trace(Q[2]);

Saturday, 11 July 2020

Greatest find CM:MM with structure | C Language

Q :  Define a structure Distance having two data members: cm and mm in integer. The program enters three variables and find which distance is the largest among them.


Answer 



#include<stdio.h>
#include<conio.h>
/*============================
     Girfa Student Help
     Find greatest cm:mm using structure
==============================*/

Recursion



Recursion



As we know C language is a building block of functions that means anything you are doing is achieved through some kind of function call. So learning about function is very important. Recursion is a concept when a function calls by itself from its function body.






Friday, 10 July 2020

Krishnamurti Number Program | C Language

Krishnamurti Number


Q : Write a program to print all the Krishnamurti number from 1 to n. Here, n is user dependent. A             Krishnamurti number is a number whose sum of factorial of individual digits equals the number.         For example, 145 = 1! + 4! + 5! = 1 + 24+ 120 = 145.

Answer :


#include<stdio.h>
#include<conio.h>
/*============================
     Girfa Student Help
     Krishnamurti number
==============================*/
int fact(int);
void main()
{

2D-Multiplication with function | C Language

Q : Write a function to display the multiplication table of the number.

Answer : 

#include<stdio.h>
#include<conio.h>
/*============================
     Girfa Student Help
     Multiplication 2d array using function
==============================*/
void multi(int ar1[3][3],int ar2[3][3],int ar3[3][3])
{