Pages

Thursday 18 December 2014

call by value and call by reference



Call by Value      In  c  language by default  the arguments are passed to the function by value. It means  the actual arguments copy  their value into the formal arguments . In  call by value we can pass  the value  .if any change is  done into the formal arguments  it doesn't  affect the actual arguments because both  the arguments use the different memory location .

Program
#include<stdio.h>
#include <conio.h>
void  show ( int    a);
void main ()

{
Int x;
clrscr() ;
printf ( “enter the value “);
scanf(“%d”,& x);

show (x);
printf( “\n now value of x =%d” , x);
getch();
}
Void show ( int a )
{
a= a+1;
printf( “\n the value of a =%d”, a);
}

Monday 15 December 2014

write a first programe in php

Create a  PHP Program and run in WAMP



1.open the dream weaver..and select the PHP.


2   Write the program in php such as :---

<?php 
echo "helloooo world this is my first program in php ";
echo "you can write it";
?>

3.Save the program such as hello.php in c:\Wamp\www\
4  Run the program it:
 5. Select the Localhost  and open the file 

Saturday 13 December 2014

Write a First Programe in C

#include<stdio.h>
 int main()

 {

  printf(“Hello World\n”);

  return 0;

 }

Save the program with .c Extension ..such as abc.c

  

#include<stdio.h>

With this line of code we include a file called stdio.h. (Standard Input/Output header file). This file lets us use certain commands for input or output which we can use in our program. (Look at it as lines of code commands) that have been written for us by someone else). For instance it has commands for input like reading from the keyboard and output commands like printing things on the screen.