Friday 12 June 2020

Actual and former parameter C Language


As we know C language is building block of function. Anything done in C language by function. Function can take argument. There are two types of argument given below.

  • Argument pass while calling is actual
  • Argument while declaring function is former


#include<stdio.h>
#include<conio.h>
/*##########################
     Girfa Student Help
     Formal and actual parameter program
  ##########################*/
int sum(int,int);
void main()
{
     int a,b,c;
     clrscr();
     a=10;
     b=20;
     c=sum(a,b);   /* a and b are actual parameter */
     printf("\n\tA=%d\n\tB=%d\n\tSum=%d",a,b,c);
     getch();
}
int sum(n1,n2) /* n1,n2 are formal parameter */
{
     return n1+n2;
}

In the function main in the example above, a, and b are all actual parameters when used to call calculate sum function. On the other hand, the corresponding variables in sum_funcation definition (namely n1, n2) are all formal parameters because they appear in a function definition.



Difference between function definition and function declaration

Difference between  function definition and function declaration

DECLARATION
DEFINITION
A variable or a function can be declared any number of times
A variable or a function can be defined only once
Memory will not be allocated during declaration
Memory will be allocated
int f(int);
The above is a function declaration. This declaration is just for informing the compiler that a function named f with return type and argument as int will be used in the function.
int f(int a)
{
  return a;
}
The system allocates memory by seeing the above function definition.

Decimal to Binary conversion C language

Q : Write a C Program using function to print equivalent binary number of decimal number input by keyboard ?

Answer : 

#include<stdio.h>
#include<conio.h>
/*##########################
     Girfa Student Help
     Decimal to Binary conversion
  ##########################*/
void main()
{
     int d,b,ar[10],i;
     clrscr();
     printf("Enter number> ");
     scanf("%d",&d);
     i=0;
     while(d>0)
     {
          ar[i]=d%2;
          d=d/2;
          i++;
     }
     i--;
     while(i>=0)
     {
          printf("\t%d",ar[i]);
          i--;
     }
     getch();
}

Thursday 11 June 2020

Second Highest number from array using C language

Q : find second largest number from 1D array of n numbers.


Answer : 


#include<stdio.h>
void main()
{
     int n1,n2,ar[5],i;

Tuesday 9 June 2020

Answer :July 2019 Introduction to ICT Resources

Answer : NIELIT (O-Level) July 2019  Introduction to ICT Resources

1. Multiple Choice


1.1 : B
1.2 : A
1.3 : C
1.4 : D
1.5 : C
1.6 : A
1.7 : A
1.8 : B
1.9 : C
1.10 : C

Monday 8 June 2020

Solved : July 2019 Introduction to ICT Resources

Solved : NIELIT (O-Level) July 2019  Introduction to ICT Resources



1. Each question below gives a multiple choice of answers. Choose the most appropriate one and enter in the “OMR” answer sheet supplied with the question paper, following instructions therein

1.1 : Number of links to connect n nodes in a mesh topology is __________.
(A) n(n+1)
(B) n(n−1)/2
(C) n+1
(D) n(n+1)/2
Answer

Answer : January 2019 Introduction to ICT Resources

Answer : NIELIT January 2019  Introduction to ICT Resources

1. Multiple Choice


1.1 : B
1.2 : D
1.3 : B
1.4 : D
1.5 : A
1.6 : C
1.7 : D
1.8 : A
1.9 : B
1.10 : D

Solved : January 2019 Introduction to ICT Resources

Solved : NIELIT January 2019  Introduction to ICT Resources 

1. Each question below gives a  multiple choice of answers. Choose the most appropriate one and enter in the “OMR” answer sheet supplied with the question paper, following instructions therein. (1x10=10)

1.1 : ___________ is a device which is used to connect two different networks.
(A) Repeater
(B) Gateway
(C) Bridge
(D) None of the above
Answer

Sunday 7 June 2020

Answer : July 2018 Introduction to ICT Resources

Answer : NIELIT (O-Level)  July 2018   Introduction to ICT Resources 

1. Multiple Choice


1.1 : D
1.2 : A
1.3 : A
1.4 : A
1.5 : C
1.6 : C
1.7 : D
1.8 : C
1.9 : C
1.10 : B

Solved : July 2018 Introduction to ICT Resources

Solved : NIELIT (O-Level)  July 2018   Introduction to ICT Resources 

1.Each question below gives a multiple choice of answers. Choose the most appropriate one and enter in the “OMR” answer sheet supplied with the question paper, following instructions therein. (1x10)

1.1 : Which of the following memories needs refresh?
A) SRAM B) DRAM
C) ROM D) All of above
Answer

Friday 5 June 2020

Answer : January 2018 Introduction to ICT Resources

Answer : NIELIT (O-Level) January 2018  Introduction to ICT Resources 

1. Multiple Choice


1.1 : C
1.2 : A
1.3 : A
1.4 : A
1.5 : D
1.6 : C
1.7 : B
1.8 : A
1.9 : A
1.10 : B

Solved : January 2018 Introduction to ICT Resources

Solved : NIELIT (O-Level) January 2018  Introduction to ICT Resources 

1. Each question below gives a multiple choice of answers. Choose the most appropriate one and enter in the “OMR” answer  heet supplied with the question paper, following instructions therein. (1x10)

1.1 : The circuit used to store one bit of data is known as _____
A) Encoder B) Decoder
C) Flip-flop D) Register
Answer

Sunday 31 May 2020

Answer : July 2017 Introduction to ICT Resources

Answer : NIELIT (O-Level)  July 2017  Introduction to ICT Resources 

1. Muliple Choice


1.1 : A
1.2 : A
1.3 : C
1.4 : D
1.5 : A
1.6 : B
1.7 : C
1.8 : C
1.9 : C
1.10 : D

Solved July 2017 Introduction to ICT Resources

Solved : NIELIT (O-Level)  July 2017  Introduction to ICT Resources 

1. Each question below gives a multiple choice of answers. Choose the most appropriate one with the question paper, following instructions therein. (1x10)

1.1 : Which chip is used to store information that describes specific device parameters?
A) BIOS B) CMOS
C) ROM D) RAM
Answer

Solved : NIELIT (O-Level) January 2017 Introduction to ICT Resources

Answer : NIELIT (O-Level) January 2017 Introduction to ICT Resources

1. Multiple Choice


1.1 : C
1.2 : C
1.3 : B
1.4 : A
1.5 : B
1.6 : A
1.7 : C
1.8 : A
1.9 : A
1.10 : B

Friday 29 May 2020

Solved January 2017 Introduction to ICT Resources

Solved: NIELIT (O-Level) January 2017 Introduction to ICT Resources

1. Each question below gives a multiple choice of answers. Choose the most answer sheet supplied with the question paper, following instructions therein. 
(1x10)

1.1 : When a computer is first turned on or restarted, a special type of absolute loader called ____ is executed
A) Compile and Go loader
B) Boot loader
C) Bootstrap loader
D) Relating loader
Answer

Monday 25 May 2020

Answer : July 2016 Introduction to ICT Resources

Answer :  NIELIT (O-Level)  July 2016  Introduction to ICT Resources

1. Multiple Choice


1.1 : C
1.2 : D
1.3 : A
1.4 : C
1.5 : B
1.6 : C
1.7 : D
1.8 : D
1.9 : B
1.10 : D

Solved : July 2016 Introduction to ICT Resources

Solved : NIELIT (O-Level)  July 2016  Introduction to ICT Resources 


1. Each question below gives a multiple choice of answers. Choose the most appropriate one and enter in the “OMR” answer sheet supplied with the question paper, following instructions therein.
(1x10)

1.1 : SMPS means
A) System Management Power Supply
B) Synchronous Mode Power Supply
C) Switched Mode Power Supply
D) Sequential Mode Power Supply
Answer

Sunday 24 May 2020

Answer : January-2016 Introduction to ICT Resources

Answer : NIELIT (O-Level) January-2016  Introduction to ICT Resources 

1. Multiple Choice


1,1 : A
1.2 : D
1.3 : B
1.4 : C
1.5  : B
1.6 : D
1.7 : C
1.8 : A
1.9 : A
1.10 : C

Solved : January-2016 Introduction to ICT Resources

Solved : NIELIT (O-Level) January-2016  Introduction to ICT Resources 

1. Each question below gives a multiple choice of answers. Choose the most appropriate one and enter in the “OMR” answer sheet supplied with the question paper, following instructions therein. (1x10)

1.1 : ________ is a device which is used to amplify only signal from one end to other end.
A) Repeater
B) Bridge
C) Switch
D) Router
Answer