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
     ********************************************/