## Q :Define two structures Metric and British that store distances. The Metric stores values in meters and centimeters and the British stores values in feet and inches. Write a program that reads both structure variables and add values contained in one variable of Metric to the contents of another variable of British. The program should display the result in both: equivalent centimeters and equivalent inches.

### Solution :

For solve this question you need to know metric measurement unit.

1 centimeter = 10 millimeters
1 meter = 100 centimeters = 1,000 millimeters

## Wednesday, 27 September 2017

### Array pass to function

Array is a collection of similar data type which occupies continuous location on memory. Array’s name is a constant pointer which point first element of array. So when an array is passing to a function. Address of first element pass to function instead of value. If any change made inside of function body with array, then it affects actual value of passed array. Following program demonstrate this fact.

#include<stdio.h>
int update(int[]);
void main()
{
int arr[5],i;
for(i=0;i<5;i++)

## Monday, 25 September 2017

### Solution :

First of all we need to understand relationship between compilation, linker and linker form following compilation steps.

## Q : Define recursion. Write a complete program to evaluate the given series using recursive function sum( ). Here n is user dependent.1 + 2 + 3 +…+ n

### Solution :

As we C language is known as building block of functions. This means everything in c language is achieved through a function. In C language there is not any restriction to call a function you can call a function from anywhere No matter of scope.

## Q : How to create a file in C? Why should a user close the file?

For create a file in language,stdio.h header file has fopen method which takes two arguments and return base address of opening file.

### Suntax

Open mode indicate file opening option whether a file is open for read, write, append or both.

## 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);

## Tuesday, 19 September 2017

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….

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)

## 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()

## 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;
}

## 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?

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.

## 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>
<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.
• An identifier may have numbers but not used as first c

## 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