Pages

Wednesday, September 11, 2013

Mcsl-054(Advanced Internet Technologies)

Mcsl-054

PART-I: MCS-051 (Advanced Internet Technologies)


QUESTION-1:  Develop a web page using Servlet which ask for your name and address  and print a message “ Welcome! Mr./Miss.  Your Name on this web page” and show the current date and time on the top of web page.                                                                                                              
Soltion:

Imporr javax.servlet.*;
Imporr javax.servlet.http.*;
Imporr java.io.*;
Imporr java.utill.Date;

Public clasas HelloServlet extends HttpServlet
{
Public void (HttpServletRequest, request, HttpServlet response)
                        Throws IoException, ServletException 
{
Response.setContentType(“Text/html”);
PrintWriter  out = response.getWriter();
Out.println (“<Htmt>”);
Out.println (“<Body>”);
Out.println (“Enter your name<input type=”text”  name=”a”>”);
Out.println (“Address <input type =”text” name =”b>”);
String n = request.getParameter (“a”);
Out.println (“Welcome! Mr./Miss” +a);
Out.println (“new.java.util.Date( ));
}
}


QUESTION-2 : Write a JSP Program, which displays a web page containing two web links one for your profiling and other for the schedule of  theory of practical classes of your Batch. When one click on link for getting your profile it goes to a JSP page which display your personal profile and by clicking on link for classes schedule another JSP page will open to show the schedule

Solution:

Menu.Jsp

<html>
<body>
<form action =”profile.jsp” method = “post”>
<input type = “submit” value=”PROFILE”>
</form>
<form action=”schedule.jsp method=”post”>
<input type=submit” value=”SCHEDULE”>
</form>
</body>
</html>
</html>

 Profile.jsp

<html>
<body>
<h1> MY PROFILE </h1>
NAME            VINITA AGARWAL
ADDRESS     A-16/F NEW DELHI
SCHOOL        MCS.SBM., NEW DELHI
UNIVERSITY           I.G.N.O.U
QULIFICATION       B.C.A, Pursuing M.C.A
Skills                           C, C++, JAVA
Ph. No.                        9811836816

</Body>
</html>

Schedule. Jsp

<html>
<body>
<h1> Schedulen OF MCA(5) THEORY <h1>
<b> MCS-051 </B>
Monday
Tuesday
Saturday
<b>  MCS-052 </b>
Sunday
<b>  MCS-053 </b>
Saturday
Sunday
</body>
<html>



QUESTION-3: Write a program using JDBC and JSP to display the computer books available in your Study Centres Library. Provide suitable options for issue/return of the books and searching and pupation in the library database.     

Solution:

SO.jsp

<html>
<body>
<form action = “Book.jsp”  method = “post”>
<input type =”submit”   value = “BookInfo”>
</form>
<form action = “Issue.jsp”  method = “post”>
<input type =”submit”   value = “Issue”>
</form>
<form action = “Search.jsp”  method = “post”>
<input type =”submit”   value = “Search”>
</form>
<form action = “Retun.jsp”    method = “post”>
<input type =”submit”   value = “Return”>
</form>
</body>
</html>

Book.jsp

 <%  @  language=”java”  import= “java.sql.*”, “java.io>
<html>
<body>
<%
Class.forName (“Com.mywqyl.jdbc.Driver”);
Connection   con=DriverManager.getConection(“jdbc : mysql : // localhost / institute”, “root”, “1234”);

Statement     st = con.createStatement( );
ResultSet    rs = st.executeQuery(“Select * from Liabrary where subject =”computer”);

Int    i= 0;
While (rs.next(i) = = True)
{
Out.println(rs.getString (i)”);
}
%>
</body>
</html>
Issue.jsp

<html>
<body>
<form action =”issued.jsp”    method = “post”>
ID NO.  <input type = “text”   name=”b”>
<%
<input type = “submit”   value= “IssueBook”>
</form>
</body>
</html>


QUESTION-4. Create an XML document for student’s record at your Study Centre.

Solution:

<?xml version=1.0 ?>
<student Records>
<student Record>
<Name> VINITA AGGARWAL</Name>
<PROGRAMME> MCA </PROGRAMME>
<E-No> 063501077</E-No>
<Address> g-14/B, Kiran Graden, uttam Naga r</Address>
<ph-no> 9811836856 </Ph-no>
<Student Record>
<Name> Shweta Chopra </Name>
<PROGRAMME> MCA </PROGRAMME>
<E-NO> 063502656 </E-NO>
<ADDRE SS> A-17/F,u.n </ADDRESS>
<ph.no> 9958621533 </ph.no>
</student record>
</student records>

Issued.jsp

<% @ language=”java” import=”java.co.x” %>
<html.
<body>
<% string b1 = response.getParameter(“a”);
Class.for Name(“Com.mysql.jdbc.Driver”);
Connection con = drivermanager.getconnetion(“jdbc:mysql://localhost”institute”, “root”, “1234”>
Statement st= con.createstatement();
Result rs= st.execute update (“update library set status=”issued” whereBook_title=””
%>

Search.jsp

<html>
<body>
<form action=”searchavailable” method=post”>
Enter Book name<input type=”text” name=”a”>
Search For availability
<input type=”submit” value”search for availability”>
</form>
</body>
</html>

Searchavailable.jsp

<% @ language=”java” import=”java.io.x”, “java.sql.x”%>
<html>
<body>
<%
String = response.getParameter(“a”);
Class.forName(“com.mysql.jdbs.Driver”);
Connection con=DriverManager.getConnection(“jdbc”.mysql://localhost/institute”, “root”, “1234”);
Statement sr-con.createstatement ();
Resukt rs=st.executeQuery (“select status from Library where Book_title=”+a+”’”);
String out= rs.getString(1);
Out.printer(n(“status=” +out+);
%>
</body>
</html>




HomeWork
-------------

Question 1:   Write a program using Servlet/JSP that accepts the account number of a bank customer as input. The program should print the details of the account. Make necessary assumptions whereever required.  


Question 2:   Write a JSP Program, which displays a web page containing two web links one for showing schedule of counselling sessions at a Study Centre and other for FAQs on Programme on offer by the university. When one click on link Study Centre it goes to a page which show the counselling schedule for MCA students. Clicking on link for FAQs on Programme on Offer, another JSP page open, which  consists of some FAQ related to different programme offered in the University. 


Question 3:  Write a program using JSP and JDBC to provide details of MCA/BCA/CIT students at a IGNOU study centres. Also the program should enable any student to change his/her address. This program should provide the practical attendance detail of students in different semesters of MCA/BCA/CIT. 


Question 4:   Create an XML document for keeping students record in a department of a University.

Power program in LISP

[1]Write LISP program and define function named power that takes two numeric arguments, n and m, that computes nth power of m (i.e., m^n).

Answer

Without Recursion
-------------------
(defun  pow( )
(setf  m(read))
(setf  n(read))
(setf  c 1)
(dotimes  (i n)

   (setf  c ( * c m))
)



Expln:

Every lisp program will start a symbol '(' .
1) Define a function named 'pow'
2) Read 'm' variable
ie; scanf  in C
3) Read 'n' variable
4) Initialise  c=1
5) For loop 
ie;  in C, for(i=0;i<n;i++)

'dotimes' only for  increment operations.
For decrementing......use  another method for 'For-loop'..

(loop for ...) refer this 

6) Set  c=c * m
In LISP,

We will use  prefix notation.
ie; why we using 

(*  c m )

Saturday, September 7, 2013

Write LISP & C Program for bubble sort ....See the difference ????

; Program by Arun Anoop M

; Asst.Professor,CSE.


(defun  bubble nil

(format  t   "Enter your number n :")

(setf   n(read))

(setf  i 0)


(format  t  "Enter array elements : ")

(setf  a(make-array  n))

(dotimes  (i  n)

   (setf  (aref  a  i) (read)
)

(print  a)

  (sort1  a  n)
  (print  "Sorted vector is :")
  (print  a)

(defun  sort1 (a  n)

  (setf   j(i+1))

  (dotimes  (i  n )

     (dotimes  (j  n )

(cond (( < (aref  a  i) (aref  a  j))

     (setf   temp (aref  a  i))

     (setf  (aref  a  i) (aref  a j))

     (setf  (aref  a  j) (temp))
)

)

)

)


--------------------------------------------------------------------------------------------


#include<stdio.h>

void main()
{
       int i,j,n,temp;
       int A[50];
       clrscr();
       printf("Enter the no. of element::");
       scanf("%d",&n);

       printf("Enter elements in array\n");

       for(i=0;i<n;i++)
       {
              printf("element %d is : ",i+1);
              scanf("%d",&A[i]);
       }

       printf("\nElements enter by you is::\n");
       for(i=0;i<n;i++)
       {
              printf("%d\t",A[i]);
       }

       for(i=0;i<n;i++)
       {
              for(j=i+1;j<n;j++)
              {
                     if(A[i]>A[j])
                     {
                            temp=A[i];
                            A[i]=A[j];
                            A[j]=temp;
                     }
              }
       }
           
       printf("\nelements sorted in asending order\n");
       for(i=0;i<n;i++)
       {
              printf("%d\t",A[i]);
       }

       getch();

}

Thursday, September 5, 2013

PC to PC serial communication-PC1

/*Program : PC to PC serial communication-PC1*/
/*Programmed By : Lubin*/
#define COM_BASE 0x3f8
#define DFR COM_BASE+3
#define LDLR COM_BASE
#define HDLR COM_BASE+1
#define SSR COM_BASE+5
#include<asm/io.h>
#include<stdio.h>
#include<stdlib.h>
#include<fcntl.h>
static inline unsigned char recv_char()
{
while(!(inb(SSR) & 1));
return inb(COM_BASE);
}
void uart_init()
{
iopl(3);
outb(0x83,DFR);
outb(0x18,LDLR);
outb(0,HDLR);
outb(0x03,DFR);
}
int main(int argc,char *argv[])
{
int count,fd,i=0;
unsigned char ch,fname[30];
uart_init();
if(argc>1)
fd=open(argv[1],O_CREAT | O_WRONLY);
else
{
printf("Enter the output file\n");
scanf("%s",fname);
fd=open(fname,O_CREAT | O_WRONLY);
}
printf("Receiving....\n");
do
{
ch=recv_char();
if((char)ch!=EOF)
{
count=write(fd,&ch,1);
i++;
}
}while((char)ch!=EOF);
close(fd);
printf("Received %d bytes\n",i);
return 0;
}

SLIDING WINDOW - SERVER & Client

/* SLIDING WINDOW - SERVER
* PROGRAMMED BY: LUBIN N*/
#include<stdio.h>
#include<stdlib.h>
#include<netinet/in.h>
#include<fcntl.h>
#include<string.h>
main()
{
struct sockaddr_in server;
int d,e,new;
char c;
d=socket(AF_INET,SOCK_STREAM,0);
server.sin_port=htons(2005);
server.sin_family=AF_INET;
server.sin_addr.s_addr=INADDR_ANY;
e=bind(d,(struct sockaddr *)&server,sizeof(server));
if(e==0)
printf("\nBinding.....\n");
listen(d,1);
int n=sizeof(struct sockaddr_in);
new=accept(d,(struct sockaddr *)&server,&n);
while(1)
{
read(new,&c,1);
if(c=='d')
printf("Received....\n");
c='a';
write(new,&c,1);
printf("\n\n\n\t\t\tAcknowledged...........\n");
}
}




/* SLIDING WINDOW - CLIENT
* PROGRAMMED BY: LUBIN */
#include<stdio.h>
#include<pthread.h>
#include<stdlib.h>
#include<sys/socket.h>
#include<unistd.h>
#include<netinet/in.h>
#include<fcntl.h>
#define window 10
int up=0,low=0,c;
void *senddata()
{
char ch='d';
while(1)
{
up++;
while(up-low>window)
{
printf("\nCompetition......Sender waiting...\n");
sleep(1);
}
printf("\t\tSending data....%d\n",up-1);
write(c,&ch,1);
}
}
void *receivedata()
{
char ch;
while(1)
{
read(c,&ch,1);
if(ch=='a')
{
printf("\n\nACK recieved for data %d\n",low);
low++;
sleep(2);
}
}
}
main()
{
pthread_t s,r;
struct sockaddr_in server;
c=socket(AF_INET,SOCK_STREAM,0);
server.sin_family=AF_INET;
server.sin_port=htons(2005);
server.sin_addr.s_addr=inet_addr("127.0.0.1");
connect(c,(struct sockaddr*)&server,sizeof(server));
pthread_create(&s,0,senddata,0);
pthread_create(&r,0,receivedata,0);
while(1);
}



//www.edutalks.org



SMTP TCP Client & Server

/*
 * SMTP USING TCP : Server Program
 * Programmed by : Lubin N
 */
#include<stdio.h>
#include<arpa/inet.h>
#include<fcntl.h>
#include<string.h>
#define PORT 4100
main()
{
struct sockaddr_in servaddr,cliaddr;
int sock1,sock2,len,l,fd,lsize,i,ch;
char fname[15],buff[500],sendname[15];
servaddr.sin_family=AF_INET;
servaddr.sin_port=htons(PORT);
servaddr.sin_addr.s_addr=INADDR_ANY;
sock1=socket(AF_INET,SOCK_STREAM,0);
bind(sock1,(struct sockaddr *)&servaddr,sizeof(servaddr));
printf("bind\n");
listen(sock1,4);
sock2=accept(sock1,(struct sockaddr *)&cliaddr,&len);
printf("accept\n");
printf("from:");
l=read(sock2,sendname,15);
puts(sendname);
for(i=0;i<l;i++)
fname[i]=sendname[i];
fd=open(fname,O_RDWR | O_CREAT,0777);
len=read(sock2,buff,500);
printf("no of characters read %d\n",len);
write(fd,buff,len);
printf("%s\n",buff);
close(sock1);
close(sock2);
}



/*
 * SMTP USING TCP : Client Program
 * Programmed by : Lubin N
 */
#include<stdio.h>
#include<arpa/inet.h>
#include<fcntl.h>
#include<string.h>
#define PORT 4100
main()
{
int sock,len;
char buff[500],sendname[15],recvname[15];
struct sockaddr_in servaddr,cliaddr;
servaddr.sin_family=AF_INET;
servaddr.sin_port=htons(PORT);
servaddr.sin_addr.s_addr=INADDR_ANY;
sock=socket(AF_INET,SOCK_STREAM,0);
connect(sock,(struct sockaddr *)&servaddr,sizeof(servaddr));
printf("Enter the name of sender\n");
gets(sendname);
write(sock,sendname,15);
printf("Enter the name of receiver\n");
gets(recvname);
printf("Enter the data\n");
gets(buff);
len=strlen(buff);
write(sock,buff,len);
close(sock);
}

SMTP UDP Server & Client

/* SMTP USING UDP - SERVER

* PROGRAMMED BY: LUBIN N


Programs in NETWORKS By Lubin, GEC Palakkad */


// www.edutalks.org


#include<stdio.h>
#include<sys/types.h>
#include<sys/socket.h>
#include<netinet/in.h>
#include<fcntl.h>
#include<arpa/inet.h>
#define SERV_UDP_PORT 4100
#define MAXMESG 2048
dg_echo(int sockfd, struct sockaddr *pcli_addr, int maxclilen)
{
int n,m,clilen,fid,lsize,i;
char msg[MAXMESG],filename[15],fname[15],buf[512];
printf("______________serv\n");
printf("accept\n");
printf("from: ");
m = recvfrom(sockfd, filename,m, 0 ,pcli_addr, &clilen);
// puts(filename);
for(i=0;i<m;i++)
{
fname[i]=filename[i];
printf("%c",fname[i]);
}
fid=open(fname,O_RDWR | O_CREAT,0777);
n = recvfrom(sockfd, buf,n, 0 ,pcli_addr, &clilen);
printf("\n msg recvd %s\n",buf);
write(fid,buf,n);
close(fid);
}
main(int argc, char *argv[])
{
int sockfd;
char choice;
char buf[200],filename[15],fname[15];
struct sockaddr_in serv_addr,cli_addr;
if((sockfd=socket(AF_INET,SOCK_DGRAM,0))<0)
printf("serveer: caan't open datagram socket");
bzero((char *)&serv_addr,sizeof(serv_addr));
serv_addr.sin_family=AF_INET;
serv_addr.sin_addr.s_addr=htonl(INADDR_ANY);
serv_addr.sin_port=htons(SERV_UDP_PORT);
if(bind(sockfd,(struct sockaddr *)&serv_addr,sizeof(serv_addr))<0)
printf("server: can't bind local address\n");
printf("bind on serv\n");
dg_echo(sockfd,(struct sockaddr *) &cli_addr, sizeof(serv_addr));
}






/* SMTP USING UDP - CLIENT
* PROGRAMMED BY: LUBIN N*/
#include<stdio.h>
#include<sys/types.h>
#include<sys/socket.h>
#include<netinet/in.h>
#include<fcntl.h>
#include<arpa/inet.h>
#define SERV_UDP_PORT 4100
#define MAXLINE 512
dg_cli(FILE *fp,int sockfd,struct sockaddr *pserv_addr,int servlen)
{
int n,m,fd;
char sendline[MAXLINE],recvline[MAXLINE+1],filename[15],fname[15],buf
[512],ch;
printf("___________\n");
printf("Enter the name of sender\n");
gets(sendline);
m=strlen(sendline);
if(sendto(sockfd,sendline,m,0,pserv_addr,servlen)!=m)
printf("error\n");
printf("Enter the name of receiver\n");
gets(recvline);
printf("Enter the message : ");
gets(sendline);
n=strlen(sendline);
if(sendto(sockfd,sendline,n,0,pserv_addr,servlen)!=n)
printf("error\n");
}
main(int argc, char *argv[])
{
int sockfd;
struct sockaddr_in cli_addr,serv_addr;
bzero((char *)&serv_addr,sizeof(serv_addr));
serv_addr.sin_family=AF_INET;
serv_addr.sin_addr.s_addr=(INADDR_ANY);
serv_addr.sin_port=htons(SERV_UDP_PORT);
if((sockfd=socket(AF_INET,SOCK_DGRAM,0))<0)
printf("error\n");
bzero((char *)&cli_addr,sizeof(cli_addr));
cli_addr.sin_addr.s_addr=htonl(INADDR_ANY);
cli_addr.sin_family=AF_INET;
cli_addr.sin_port=htons(0);
if(bind(sockfd,(struct sockaddr*)&cli_addr,sizeof(cli_addr))<0)
printf("error\n");
printf("bind on client\n");
dg_cli(stdin, sockfd, (struct sockaddr *) &serv_addr, sizeof
(serv_addr));
close(sockfd);
exit(0);
}

Saturday, August 17, 2013

Viva Questions

What are the difference between Token-Ring & Token-Bus?

What is Proxy ARP?

What are the difference between node,host,terminal,system,hub?

WHAT IS MEAN BY DNS(DOMAIN NAME SYSTEM)AND WHAT IS THE PURPOSE OF IT?

What is the difference between TFTP and FTP application layer protocols?

What is the difference between hub,switch and router?

What is Bandwidth?

What is the Network Time Protocol?

What is passive topology?

What is Mail Gateway?

What is difference between ARP and RARP?

What is PING utility?

What is RAID?

What are the advantages and disadvantages of the three types of routing tables?

What are the different type of networking / internetworking devices?

What is a difference between switch and Hub?

What is a VLAN?

What does VLAN provide?

If you are given the IP address can u tell how many computers can be 
connected?What do you look at?

Difference between the communication and transmission?

What is the difference between physical address and logical address?

Describe a 3-way TCP/IP Handshake.                                                 

What is TCP

What is UDP

What is rawsocket

What is sliding window protocol

What is RPC & its advantages.

What is DNS

What is router.

What is routing protocol

What is shortest path.

What is BGP(border gateway protocol.

What is client server model.

What is port

What is ip address

What is localhost

What is ping, traceroute program

What is socket

What is the structure for socket programming

What is listen,bind,connect,accept, read,write

What is bzero()

What is sprintf()

Terms regarding Network Programming-Viva Questions

What is a Socket?
NAM means?
What is a Node?
What is the use of IP address?
What are the differences between IPV4 and IPV6?
What is physical address? Whether it is unique?

What is the abbreviation of MAC ?
MAC is in datalink layer.
TCP and UDP in transport layer of ISO/OSI layer.

What is the size of MAC-address? (MAC addresses are 12-digit hexadecimal numbers (48 bits in length))
What is the size of IPV4,IPV6?
What is client-server communication?
What is socket programming?
What are the socket functions we are using in TCP and UDP?
How to customize "a.out"?

How to know MAC-address ?
Win+R or open-RUN
cmd
ipconfig /all             OR     getmac

Want to know more about "socket" ??
Click here
Bind


A network socket is an endpoint of an inter-process communication flow across a computer network.

Datagram sockets, also known as connectionless sockets, which use User Datagram Protocol (UDP)

Stream sockets, also known as connection-oriented sockets, which use Transmission Control Protocol (TCP)

port is an application-specific or process-specific software construct serving as a communications endpoint in a computer's host operating system. A port is identified for each address and protocol by a 16-bit number, commonly known as the port number. The port number, added to a computer's IP address, completes the destination address for a communications session.  A port number is a 16-bit unsigned integer, thus ranging from 1 to 65535 (port number 0 is reserved and can't be used).


 An IP address serves two principal functions: host or network interface identification and location addressing. Its role has been characterized as follows: "A name indicates what we seek. An address indicates where it is. A route indicates how to get there"  IP addresses are binary numbers, but they are usually stored in text files and displayed in human-readable notations, such as 172.16.254.1 (for IPv4), and 2001:db8:0:1234:0:567:8:1 (for IPv6).
Need more about IP-address....clickhere

What is subnet-mask?

What is PING utility?

What is a loop-back address?
127.0.0.1

What is MAC-address?
Class D addresses(224.0.0.0 to 239.255.255.255)

Class E IP addresses for "reserved for future".












Network Programming-UDP

UDP provides a connectionless service as there need not be any long-term relationship 
between a UDP client and server.

The TCP/IP protocol suite provides two transport protocols, the User Datagram Protocol (UDP) and the Transmission Control Protocol (TCP).There are some fundamental differences between applications written using TCP versus those that use UDP.

These are because of the differences in the two transport layers: 

UDP is a connectionless, unreliable, datagram protocol, quite unlike the connectionoriented, reliable byte stream provided by TCP. 
UDP is less complex and easier to understand.


1)The client does not establish a connection with the server.
2)The client just sends a datagram to the server using the sendto function, which requires the address of the destination as a parameter. Similarly, the server does not accept a connection from a client.
3)Instead, the server just calls the recvfrom function, which waits until data arrives from some client.
4)recvfrom returns the protocol address of the client, along with the datagram, so the server can 
send a response to the correct client. 



The UDP client and server are created with the help of DatagramSocket and Datagram packet classes. If the UDP protocol is used at transport, then the unit of data at the transport layer is called a datagram and and not a segment. In UDP, no connection is established.

If TCP is used for sending data, then the data is written directly to the socket (client or server) and reaches there as a connection exists between them.


Network Programming -- TCP Program

Socket function:

#include <sys/socket.h>
int socket (int family, int type, int protocol);



The family specifies the protocol family

Family Description
AF_INET IPV4 protocol
AF_INET6 IPV6 protocol
AF_LOCAL unix domain protocol
AF_ROUTE routing sockets
AF_KEY key socket

Type Description
SOCK_STREAM Stream description
SOCK_DGRAM Datagram socket
SOCK_RAW Raw socket

Connect function:
The connect function is used by a TCP client to establish a connection
with a TCP server.
int connect(int sockfd, const struct sockaddr *servaddr, socklen_t addrlen);

Bind function: 
The bind function assigns a local protocol address to a socket.
int bind(int sockfd, const struct sockaddr *myaddr, s ocklen_t addrlen);

Close function:
The normal UNIX close function is also used to close a socket and terminate a TCP
connection.
#include<unistd.h>
int close(int sockfd);
Return 0 if ok, -1 on error.

Listen function: 
The second argument to this function specifies the maximum number of
connection that the kernel should queue for this socket.
int listen(int sockfd, int backlog);

Accept function: 
The cliaddr and addrlen argument are used to ret urn the protocol address of the
connected peer processes (client)
int accept(int sockfd, struct sockaddr *cliaaddr, socklen_t *addrlen);

IPv4 Socket Address Structure:
An IPv4 socket address structure, commonly called an “ Internet socket address
structure, “ is named sockaddr_in and defined by including the <netinet/in.h> header.








Friday, August 16, 2013

Viva Questions-LISP


LISP Inventor?  

                           John McCarthy 

Lisp Stands for?
            LISt processing.

LISP Application?
                 artificial intelligence (AI) research
Differences between 'compiler'  and '

interpreter'   ?

          Both are translators.

How to print a message in LISP?
          
          (print 'Enter the Limit')

How to read a variable in LISP?

          (setf   l(read))

How to create an array in LISP?

          (setf  a(make-array l))

How to create an array with size 50 in LISP?

          (setf  a(make-array 50))                       



How to read an array in LISP?
          (setf   (aref a i)(read))


What is the syntax for 'for-loop' in LISP?

          (dotimes (i n))

or 
          (loop for ............)



How to 'comment' a line in LISP?

          ;  (print  'hi')

If LISP language is a compiler or interpreter?

         Interpreter


How to define a function in LISP?


        (defun sum(arguments))


How to call a function in main() ?

        (partision a b)



Will continue...........


  •