Wednesday 20 September 2017

Single link list upto 20 number

Q : Write a program to create a link list. There should be 20 nodes in the list, each node contains an integer between 1-20. The list should be printed at the end.


Solution : 

#include<stdio.h>
typedef struct nlist
{
     int data;
     struct nlist *next;
}node;
node *start=NULL;
node* create(int);
void add(int);

Tuesday 19 September 2017

Combine multiple css link into single link

A website has more than external css file which must be reference on page where it has to use. When a lot number of css file being used it increase complexity for web developer because of add many external link.


So for sake of simplicity of your web page. You can use @import. Which help you to add more than one external css file referenced by a single line? You need to add all your external css file reference into a single css file. Add this file link to your web page and enjoy compress coding….

CSS File


file1.css


h1
{
     color:red;
}

Sunday 17 September 2017

Average of every third number

Q : Write a ‘C’ program to compute the average of every third integer lying between 1 and 200? Include  appropriate documentation?

Solution :

#include<stdio.h>

void main()
{
     int i,sum,avg;
     for(i=1,sum=0;i<=200;i=i+3)

Saturday 16 September 2017

print a character as per given number


Q : Write a program having function print_char( ) which receives a character and n integer as arguments. The function should print n times the entered character.

Solution : 

#include<stdio.h>
void print_char(char,int);
void main()

Wednesday 13 September 2017

What is pointer? How is it initialized? What is indirection operator? What is the scale factor

Q : What is pointer? How is it initialized? What is indirection operator? What is the scale factor?

Solution: 


Pointer

A pointer is a special type of variable which hold physical address of a non pointer variable.Symbol * is used to make a pointer variable. Programmer can change a variable value from another location with the help of pointer. Call reference is an example of pointer , in which  a variable physical address pass to a function and any change made inside of function direct affect actual value of passed variable due to pointer.

Monday 11 September 2017

Structure C#

namespace ConsoleApplication1
{
    struct School
    {
        public int roll;
        public string name;
        public string city;
    }

Sunday 10 September 2017

Explain the working of shorthand assignment operators, pre and post increment operator and the ternary operator.

Q : Explain the working of shorthand assignment operators, pre and post increment operator and the ternary operator.

Solution : 

Assignment Operator

Prefix operator

Add or subtract a variable value by one. There are two types of prefix operator increment and decrement. If use in any expression or equation then first increment or decrement variable then solve related equitation with new value of related variable.

int a,b=10;

Assignment Operator


Question: What is the name = operator in mathematics?
Answer: is equal to

Write In C language terminology this operator is known as Assignment operator which is use to assign right hand side value into left hand size variable with overwrite mode. An assignment operator has following attributes.
  • Place right hand side data into left hand side variable.

Saturday 9 September 2017

Vowel count separately Program

Q : Write a program to calculate number of vowels (a,e,i,o,u) separately in an entered string.?

Solution :


#include<stdio.h>
void main()
{
     int a,e,i,o,u,index;
     char str[50];
     a=e=i=o=u=0;
     printf("Enter string>> ");
     gets(str);
     for(index=0;str[index]!='\0';index++)
     {
          switch(str[index

Thursday 7 September 2017

CSS Media Query

<html>
<head>
<title>@Media Query Girfa</title>
<style>
.container h1
{
     margin-top:15%;
     font-size:4em;
      line-height: 1.2em;
    text-transform: uppercase;
    font-weight: bold;

Wednesday 6 September 2017

Identifier C Language

Identifier is user defined name given to function, variable, structure, union, array etc. followings are rules to name an identifier.
  • Name must be start with alphabet or underscores
  • An identifier may have numbers but not used as first c

Saturday 2 September 2017

M3-R4: PROGRAMMING AND PROBLEM SOLVING THROUGH ‘C’ LANGUAGE July- 2013 Answer

 M3-R4: PROGRAMMING AND PROBLEM SOLVING THROUGH ‘C’ LANGUAGE July- 2013, Answer

1. Multiple Choice

1.1 : D
Explanation :  Smallest individual unit of program is known token. Eg. (,},1,A,;

1.2 : A

Friday 1 September 2017

Jquery to PDF Generator


Jquery to PDF Generator

PDF Generator


Steps to make PDF document

  • Add jspdf.min.js
  • Make a divison and put all your HTML content
  • Make a control on call GetPDF function on click event
  • Copy Paste GetPDF Code into your script section


HTML


<div id="content">
      
        <h3>Steps to make PDF document</h3>
        <ul>

Thursday 31 August 2017

Preprocessor Directive

A pre-processor directory is a set of text which is start with # symbol. When C source code compile then process of compilation get start from pre-processor directory. It means all pre-processor directories compile before actual compilation.

Preprocessor Directive C Language

Example
  • Header fil

Computer Fundamental MCQ CCC

CCC Fundamental MCQ/True-False Question with Answer

Multiple Choice

1. How many types of memory used in computer?
A) 1
B)  2
C) 3
D) 4

2.  Which Type of memory got outdated?
A) PROM
B)EEPROM
C)CD

Wednesday 23 August 2017

Command Line Argument

C language is known as a language of building block of function. It means all the things achieved by the language using function.

A function is a set of some valid statements of language. Which achieved some specific task? You need to know some information about function before using it.
  • Function name
  • Return type

Tuesday 22 August 2017

Print Some Character from a File

Q : Write a ‘C’ program to print only first 12 characters including blank space from file test.txt.
Solution :

#include<stdio.h>
#include<conio.h>

void main()
{
     FILE *pt;
     int i;
     char ch;
     pt=fopen("test.txt","r");
     if(pt==NULL)

Structure size without sizeof operator

Q : Write a ‘C’ program to find size of structure without using sizeof operator.

Solution :


#include<stdio.h>
typedef struct stu
{
     int roll;
     char name[20];

Monday 21 August 2017

Write A Line to File

Q: Write a ‘C’ program to write a line of string at a text file.

Solution : 


#include<stdio.h>
void main()
{
     FILE *pt;
     char ar[100];
     int i;
     printf("Enter the Text>> ");
     gets(ar);
     pt=fopen("test.txt","w");
     if(pt==NULL)
          puts("Unable to open file");
     else
     {
          for(i=0;ar[i]!='\0';i++)
               putc(ar[i],pt);
     }
     printf("\nData created successfully");
     fclose(pt);
    
}

Saturday 19 August 2017

Sorting C Language Keyword Program

Q : Write a ‘C’ program to list of keywords which must be sorted in increasing order in the table.

Solution : 


#include<stdio.h>
int power(int,int);
void main()
{

     char keyword[][15]={"char","do","extern","if","return","static","union","while","case","default","enum","goto","register","

Friday 18 August 2017

Disable Enable Datagrid column Editing

You can  disable to edit some column and make other read only from DataGridview in Windows Programming, For some special circumstances like on a shop sales bill editing . A user need to change product, quantity and rate but not Total . Total will be calculated by product of rate and quantity. If Total pr

CCC Syllabus



COURSE ON COMPUTER CONCEPTS (CCC)


OBJECTIVE:


The course is designed to equip a person to use computers for professional as well as day to day use. It provides theoretical background as well as in depth knowledge of Software/ packages. After completing the course the incumbent will be digitally literate and will be able to:

Thursday 17 August 2017

Power of number using function

Q: Write a ‘C’ program to find the power of number using function.?

Solution :


#include<stdio.h>
int power(int,int);
void main()
{
     int n,p;
     printf("Enter number>> ");
     scanf("%d",&n);

Wednesday 16 August 2017

Word Count

Q : Write a ‘C’ program to count number of words in a string.

Solution :



#include<stdio.h>
void main()
{
      char str[50];

Sunday 13 August 2017

Jquery HTML Tag Select


Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero.

Jquery Name Selector


You can select html control by its name. Selecting a single control or group of controls is become important in some special web operation requirement. I am going to demonstrate you to select more than one checkbox for payment which may be useful to design some payment related website.


Roll Name Subject
101 Sona Hindi
102 Mona Art
103 Sita Maths
104 Anita English
105 Babita Hindi


Code : 



<html>
<head>

Saturday 12 August 2017

C Language O Level January-2014 Solved Paper


1. Multiple Choice


1.1 : D
Explanation :  
Integer and float both are in arithmetic statement So integer will be promoted as float . final result will be consider as float that is why sizeof operator print 4 instead of 2.

Variable is not initialized after decoration So variable will have garbage data which most of time be a negative number. So   6-1=5

Friday 11 August 2017

Array of structure

Q: Define a structure of student with the following fields: rollNo, name and marks. Write a program to read and store the data of at most 30 students in an array. Also display the average marks of
the students.

Solution : 


#include<stdio.h>
#define MAX 3
typedef struct Stu
{
     int roll;
     char name[20];
     int mark;
}student;

IDENT_CURRENT SQL Server

IDENT_CURRENT returns newly inserted record‘s auto increment value. So you can use this data while inserting a record it can be useful in many times. For example you want to return newly inserted record is for other task etc.


 USE [girfa]
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:        Raj Kumar
-- Create date: 08-Aug-2017
-- Description:   Girfa Student Help
-- =============================================
alter PROCEDURE [dbo].[adddata]

Vowel Count Switch statement

Q : using a switch statement, write a function to count the number of vowels and number of blanks
in a character array passed to it as an argument.

Solution 



#include<stdio.h>
#define MAX 20
void count(char*);

Prime number in given range

Q : Write a program to display all the prime numbers between two positive integers m and n. The values of m and n are to be taken from the user.

Solution : 


#include<stdio.h>
void main()
{
     int n,m,p;
     printf("Enter range starting number>> ");
     scanf("%d",&m);

Thursday 10 August 2017

Jquery ID Selector

Enter Comment:



<html>
<head>
<title>Jquery Selector Girfa Student Help</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
   $(document).ready(function(){
    $("button").click(function(){
        $("#container").text($("#data").val());
    });
});
</script>
</head>
<body>
Enter Comment:  <br /><textarea id="data" rows="7" cols="50"></textarea><br /><br /> <button>Add</button>
<p id="container">

</p>
</body>

Wednesday 9 August 2017

Jquery class selector

You can select a HTML tag with its class name which is used by tag. When you know class name then you can add custom HTML from a function of java script using jquery class selector.

<html>
<head>
    <title>Girfa Student Help</title>
    <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.2.1.min.js"></script>
    <style>
        .para
        {
            text-align:center;

Tuesday 8 August 2017

2d Array Compare

Q : Write a function that returns 1 if the two matrices passed to it as argument are equal and 0
otherwise.

Solution : 


#include<stdio.h>
#include<conio.h>
#define ROW 2
#define COL 2
int compare(int a1[ROW][COL],int a2[ROW][COL]);
void main()
{
     int ar1[ROW][COL],ar2[ROW][COL],r,c;
     clrscr();

Jquery Page Scroller



Jquery Page Scroller


Page scroller make your web page design more attractive and formal because when a user want see other part of your page, then  he/she need to scroll page up or down using scroll bar or mouse wheel which was accepted before of jquery. Now if we have jquery then why we used traditional page design.So scroller you page using jquery.

Page scroller also helps to design single page website.

Scroll to Top of window

$('html, body').animate({ scrollTop: 0 }, 0);
$('html, body').animate({ scrollTop: 0 }, 'slow');


Scroll to selected area of web page

function Trans(id)
        {
            $('html, body').animate({

Monday 7 August 2017

Average Age Calculation with dynamic structure array

Q : Write a program which asks the user to enter the name and age of persons in his group. The numbers of persons is not known to the user in the beginning of the program. The user keeps on entering the data till the user enters the age as zero. The program finally prints the average
age.

Solution :

#include<stdio.h>
#include<conio.h>
typedef struct stu
{
      char name[20];
      int age;
      struct stu * next;

Friday 4 August 2017

* Operator Pointer

Pointer is a special type of variable which hold address of a location in memory. * symbol is use to make pointer. You can manipulate any variable data though pointer from other function. Change will be permanent when it been done with pointer because pointer has actual physical location of a variable.

You can manipulate a variable data using pointer. By
  • First make a pointer variable
  • Assign address of variable to pointer
  • Access variable data though * operator

Sum of series

#include<stdio.h>
void main()
{
     int i,j,k=0;
     char sym='+';
     printf("Enter n>> ");
     scanf("%d",&i);

Thursday 3 August 2017

Multiplication Table

#include<stdio.h>
void table(int);
void main()
{
     int i;
     printf("Enter number>> ");
     scanf("%d",&i);
     table(i);
    

Flow Chart Factorial Number