Welcome to W3Courses
 Like Us on Facebook

Programming

Automatic Redirect using Javascript

You can redirect your users from the current page to a desired page using JavaScript. Please use the following code to do so:

 CODE
<script type="text/javascript">
<!--
window.location.href = "http://www.w3courses.com/"
//-->
</script>

Share

Multi Level Drop Down Category & Subcategory Hierarcheal Selection using JavaScript

This code will enable you to populate the list of states depending on the country selection. For example if you choose United States in the country drop down selection, the state drop down will contain Alaska, California etc. Else if you choose Canada, the state drop down list will contain Alberta, British Columbia etc.

All of this is done without reloading the page. This script could also be used in other formats, e.g., automobiles: type/make/model; or books: publisher/author/title. In order implement this script, perform the instructions below:

Share

Source Code for Binary Recursive Search in C Programming

Following is the source code for binary recursive search:

#include <stdio.h>
#define N 20

Share

Source Code for Linear Recursive Search in C Programming

Following is the source code for Linear Recursive Search:

#include <stdio.h>
#define N 20

Share

Source Code to Create Simple Linked List in C Programming

Following is the source code to create a simple linked list:

struct node_struct
{  int data;
   struct node_struct *next;
}*list,*curr;

Share

Source Code to Create Linked List Kernel (car, cdr, cons, empty list, printlist, readlist etc.) in C Programming

Following is the source code to create a Linked List Kernel (car, cdr, cons, empty list, printlist, readlist etc.)

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>

int checking = 0;                   
typedef int boolean;
typedef char data;

Share

PrintList Shorter Last Element Source Code for Linked List Functions and Procedures in C Programming

Following is the Source Code to Create Linked List Functions and Procedures (PrintList, Read Element, Read List, Shorter, Last Element)

Share

Delete All Delete First Delete Last Source Code for Linked List Functions and Procedures in C programming

Following is the Source Code to Create Linked List Functions and Procedures (Delete All, Delete First, Delete Last)

(1)
list del_all (list L, data alpha)
{
 if (null(L))
  return nullist();
 else if (car(L) = = alpha)
  return del_all(cdr(L), alpha);
 else
  return cons(car(L), del_all(cdr(L), alpha));
}

Share

Copy Rotate Delete Last Element Subtract Source Code for Linked List Functions and Procedures in C Programming

Following is the Source Code to Create Linked List Functions and Procedures (Copy, Rotate, Delete Last Element and Subtract)

(1)
list copy (list L)
{
 list J;
 if (null(L))
  J = nullist();
 else
  J = cons(car(L), copy (cdr(L)));
 return  J;
}

Share

Return Last Element Second From Last Delete N Source Code for Linked List Functions and Procedures in C Programming

Following is the Source Code to Create Linked List Functions and Procedures (Return Last Element, Second From Last, Delete N)

Share