Thursday 2 February 2017

Link List Count Function

NIELIT O Level Solved Paper
January 2016

Q 9 B. Define the structure of a node of a singly linked list and use it to write a function to count the
number of nodes in a singly linked list. The function should accept a pointer to the first node of
the list and it should return the number of nodes in the list.

Solution : 

/*   ************************************************
           Girfa : Student Help
           Counting node in link list
           for more program visit : http://girfahelp.blogspot.com/p/c-language-assignment.html
     *************************************************/

Wednesday 1 February 2017

Simple Triangle C Language

Simple Triangle C Language Code

While Loop Implementation :

#include<stdio.h>
void main()
{
     int i,j;
     i=1;
     while(i<=5)
     {
           j=1;
           while(j<=i)
           {
                printf("*");
                j++;
           }
           printf("\n");
           i++;
     }
}

Monday 30 January 2017

C Language Structure Record Entry

NIELIT O Level Solved Paper
January 2016
C Language

Q8 b) Write a program to create a structure Employee having empCode, name, department, address and salary as its members. Read the details for 10 employees and then display them.

Solution : 

#include<stdio.h>
#include<conio.h>
struct stu
{
     int empcode;
     char name[20];
     char dept[20];
     char address[20];
     int sal;

};

Factorial number with recursion

NIELIT O Level Paper
C Language
 January 2016 Solved

Q8 a) Write a program having a recursive function to calculate the factorial of a number. In the main() function, read the value of the number and then using the recursive function display the result.

Solution :

/*   ################################
     Girfa Student Help
     Factorial recursion  program
     for more visit : http://girfahelp.blogspot.in/p/c-language.html
     ################################

Traffic Light Programe

NIELIT O Level January 2016 Solved

Q 7 : c) Write a program that displays the recommended actions depending on the color of a traffic light using the switch statement.

Solution : 

/* *******************************************
     Girfa : Student Help
     Traffic Light Program
     for more program visit : http://girfahelp.blogspot.in/p/c-language.html
     ********************************************/

Saturday 28 January 2017

Difference between while and do while

NIELIT O Level January 2016 Solve paper

Q 7 b.(ii) while and do..while loops

Iteration statements allow the set of instructions to execute repeatedly till the condition doesn’t turn out false. The Iteration statements in C for while loop and do while loop. These statements are commonly called loops. Here, the main difference between a while loop and do while loop is that while loop check condition before iteration of the loop, whereas do-while loop, checks the condition after the execution of the statements inside the loop.

BASIS FOR COMPARISON
WHILE
DO-WHILE
Syntax
while ( condition) {
statements; //body of loop
}
do{
.
statements; // body of loop.
.
} while( Condition );
Controlling Condition
In 'while' loop the controlling condition appears at the start of the loop.
In 'do-while' loop the controlling condition appears at the end of the loop.
Iterations
The iterations do not occur if, the condition at the first iteration, appears false.
The iteration occurs at least once even if the condition is false at the first iteration.

Friday 27 January 2017

Passing array to function call by reference

NIELIT O Level January-16 

Q 7 (a) . How does passing an array as an argument to a function differ from call by value?

Solution : 


An array is a collection of similar data type which occupies continuous location on memory. Name of array is constant pointer which point (store address of first element of array) first element. When we passed an array to a function as an argument then we pass address of first element and if any change made inside of function to passing array then its effect original location because it is call by reference.
So when an array is passed to a function as an argument then it’s always being pass by reference.

Passing Array to function  C Language


Java Script Album With PHP

<html>
<head>
 <title>
Girfa :Student Help :: PHP Java Script Programming
</title>
 </head>
<body>
 <?php
echo 
"<script language='javascript'>";
echo 
"var i=0; show();";
echo 
"function show(){i++;if(i==5){i=0;}else{img1.src=i + '.jpg'";
echo 
"} setTimeout('show()',1000);}</script>";
?>
</body>
</html>

Passing 2D Array to Function

NIELIT O Level January 2016

Q 6.c :  Write a function to read a two dimensional matrix along with the number of rows and columns in it, from the user. The contents of the array and the number of rows and columns should be passed back to the calling function.

Solution : 

/*   ************************************************
           Girfa : Student Help
           Passing Two dimentional array to a function
           for more program visit : http://girfahelp.blogspot.com/p/c-language-assignment.html
     *************************************************/
#include<stdio.h>
#include<conio.h>
#define ROW 10
#define COL 10
void print(int (*)[],int,int);
void main()
{
     int ar[ROW][COL],r,c,i;
     clrscr();
     for(r=0,i=1;r<ROW;r++)
     {
           for(c=0;c<COL;c++)
           {
                ar[r][c]=i;
                i++;
           }
     }
     printf("Enter Number of row and column to read>> ");
     scanf("%d%d",&r,&c);
     print(ar,r,c);

Thursday 26 January 2017

Differentiate between if and switch case

NIELIT O Level January-2016

Q 6 B (i) :  Differentiate between  if and switch case

Solution : 
While programming, a number conditions come and a number of decisions need to be taken by a programmer. For decision making in C programming, the statements such as if, if..else, else if, switch case etc.
Though which when number of possible condition got increase in some scenario then if-else ladder implementation become complicated. So we can achieve this using switch case in simple manner with decreasing complexity.

Wednesday 25 January 2017

function to print the series

NIELIT O Level
C Language Paper 
January-16
Question no: (6.b)

Write a function to print the sum of the following series:
                               1 + 22 + 33 + … + nn

Solution : 



/*   ################################
     Girfa Student Help
     Function for series printing
     for more visit : http://girfahelp.blogspot.in/p/c-language.html
     ################################
*/
#include<stdio.h>
#include<conio.h>
int sr(int);
void main()

Factorial Number Flow Chart

Draw a flowchart to print the factorials of numbers from 1 to n, where n is entered by user


Factorial Number Flow Chart


Monday 23 January 2017

Write A program to input two number and check whether its is Twisted Twin Prime Number or not?

Q: Write A program to input two number and check whether its is Twisted Twin Prime Number or not?
Explanation : Two Number said to be twisted twin prime number if gap between given number is 2 and Prime, Reverse prime
Ex :  11-13

Solution :

/*   ################################
     Girfa Student Help
     Twisted Twin Prime number
     (11-13=11-31)
     for more visit : http://girfahelp.blogspot.in/p/c-language.html
     ##########################

Write a program to input two number and check whether its is twin prime number or not? Explanation :

Q1.  Write a program to input two number and check whether its is twin prime number or not?

Explanation :

Twin Prime Number C Language Program

Saturday 21 January 2017

Image Save Using VB.Net in Access

Image Save Using VB.Net in Access

Control List

  • Three Form (MDI,save and Show)
  • Text box , open file dialog ,button on save button
  • Gridview,Picture Box , Label on show form

Write a program to shift array element with previous one (Left to Right) . Last element will be replace with first element ?

Q : Write a program to shift array element with previous one (Left to Right) . Last element will be replace with first element ?

Input /Output : 

Left shift array program  C Language

Solution : 


/*   *******************************
     Girfa : Student Help
     Left shift each element of array from left to right
     for more program visit: http://girfahelp.blogspot.in/p/c-language-array-programming.html
     ********************************
*/

Friday 20 January 2017

UGC Net Computer Science First Paper December-14 Page 2 Solved

UGC Net Computer Science First Paper December-14 Page 2 Solved

UGC Net Computer Science First Paper December-14 Page 2 Solved

11. Two numbers are in the ratio 3 : 5. If 9 is subtracted from the numbers, the ratio becomes
12 : 23. The numbers are
(A) 30, 50 (B) 36, 60
(C) 33, 55 (D) 42, 70

12. The mean of the ages of father and his son is 27 years. After 18 years, father will be twice
as old as his son. Their present ages are
(A) 42, 12 (B) 40, 14
(C) 30, 24 (D) 36, 18

UGC Net Computer Science First Paper December-14 Page 1

UGC Net Computer Science First Paper December-14 Page 1

UGC Net Computer Science First Paper December-14 Page 1 Solved

1. The term ‘Yellow Journalism’ refers to
(A) sensational news about terrorism and violence
(B) sensationalism and exaggeration to attract readers / viewers.
(C) sensational news about arts and culture
(D) sensational news prints in yellow paper.
Answer B
2. In the classroom, the teacher sends the message either as words or images. The students
are really
(A) Encoders 
(B) Decoders
(C) Agitators 
(D) Propagators
Answer B

Thursday 19 January 2017

UGC Net Computer Science December 13 Paper 3 Page 1 Solved

UGC Net Computer Science December 13 Paper 3 Page 1 Solved

UGC Net Computer Science December 13 Paper 3 Page 1 Solved

1. If the primal Linear Programming problem has unbounded solution, then it’s dual problem will have
(A) feasible solution
(B) alternative solution
(C) no feasible solution at all
(D) no bounded solution at all
Answer C
Explanation :-
If the Primal problem is feasible, but unbounded in the direction of optimisation, then the dual has no feasible solution. Otherwise, if the Primal problem has an optimal solution, then the dual has also an optimal solution.

So the answer for your question is that feasibility of the Primal problem does not imply optimality for the Dual problem. It just excludes the possibility that the Dual will be unbounded in the direction of optimisation.

Wednesday 18 January 2017

UGC Net Computer Science December-12 Paper 3 Page 4 Solved

UGC Net Computer Science December-12 Paper 3 Page 4 Solved

UGC Net Computer Science December-12 Paper 3 Page 4 Solved

31. Which of the following flags are set when ‘JMP’ instruction is executed ?
(A) SF and CF
(B) AF and CF
(C) All flags
(D) No flag is set