Sunday, 7 February 2016

First Assignment on Decision Statements and Loops for B.Tech CSE, 2nd Sem students,B1 and B2

Dear Students,

Find below your first assignment on decision statements and loops.


1.          WAP to find out whether input letter is vowel or not.
2.          WAP to print following patterns:
1                                                    *                                             * * * * *
1 2                                                 * *                                         * * * *
1 2 3                                             * * *                                       * * *
1 2 3 4                                         * * * *                                     * *
1 2 3 4 5                                      * * * * *                                 *
3.       WAP to enter numbers till the user wants. At the end it should display the count of positive, negative and zero entered.
4.       WAP to read the age of 100 persons and count the number of persons in the age group 50 to 60. Use FOR and CONTINUE statement.
5.      WAP to print all integers that are not divisible by either 2 or 3 and lie between 1 and 100. Program should also account the number of such integers and print the result.
6.         WAP to input 10 integers (both positive and negative) and compute the sum of all positive values and print the sum and number of values added. The program should terminate if the sum exceeds 30.
7.          WAP to find out sum of digits of a given number.
8.          WAP to print reverse of number inputted through the keyboard.
9.          WAP to find out a raised to power b using loops.
10.       What will be the output of following program?                                                                                         
                                                                                                                                                                                                         
                void main()
                {
                                int x=4,y=0,z;
                                while(x>=0)
                                {
                                    x--;
                                    y++;
                                    if(x==y)
                                                continue;
                                    else
                                                printf(“\n%d%d”,x,y);
                                }
                }
11.          An Armstrong number is the one in which the sum of cubes of its digit is equal to the number itself. The program takes a number as input and output whether the given number is an Armstrong number or not. For example: (a) 371 is an Armstrong Number as 27+343+1=371 (b) 153 is an Armstrong Number (1+125+27=153) (c) 42 is not an Armstrong Number (64+8=72).
12.          Three numbers form a Pythagorean triple if the sum of squares of two numbers is equal to the square of the third. For example, 3, 5 and 4 form a Pythagorean triple, since 3*3 + 4*4 = 25 = 5*5 You are given three integers, a, b, and c. They need not be given in increasing order. If they form a Pythagorean triple, then print "yes", otherwise, print "no".

13.           You are given an input N, which is a positive integer. Write a program to find the sums of fourth powers of the first N numbers. (For ex. if you input 4, output should be the sum 14+24+34+44).


Monday, 30 November 2015

File handling program for B.Tech(CSE) students

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

void main()
{
FILE* fp;
char ch;
fp=fopen("ABC.txt","w");
if(fp==NULL)
{
printf("File Doesn't exist");
exit(1);
}
fputs("Hello World",fp);
fclose(fp);
fp=fopen("ABC.txt","r");
if(fp==NULL)
{
printf("File Doesn't exist");
exit(1);
}
while(1)
{
ch=fgetc(fp);
if(ch==EOF)
{
break;
}
printf("%c",ch);
}
fclose(fp);
getch();
}

Monday, 23 November 2015

List of Practicals for B.Tech(CSE)-7th sem

Dear Students,

Find below the list of practicals to be included in practical record file. Further, lab internal examination will be held on 30th Nov. Bring your lab file on 30th and be prepared for viva-voce on the same date. Internal will be of 30 marks which will comprise your attendance, lab record file and your performance in the viva voce.


List of practical to be included in practical file:

1.         Write a C Program to demonstrate working of Lexical Analyzer.
2.         Write a C Program to check whether a string belongs to a grammar or not.
3.         Write a C Program to find leading terminals.
4.         Write a C Program to find trailing terminals.
5.         Write a C Program to compute follow of non terminals.
6.         Write a C Program to remove left factoring present in a grammar.
7.         Write a C Program to implement stack operations using linked list.
8.         Write a C program to count number of spaces and new lines.
9.         Write a C Program to show various operations i.e. read, write and modify in text file.
10.     Write a C Program to generate parse tree.

11.     Write a C Program to check whether a grammar is left recursive and remove left recursion.

Sunday, 15 November 2015

Thursday, 5 November 2015

List of Practicals for B.Tech(IT), 1st semester Students

Dear students,

Here is the list of practicals that should be contained in your FOC lab file. Each experiment must contain source code of the program and output obtained from sample run of the program. Practicals must be in the same order in which they have been given below.  Practical file must be submitted on or before 18th of November.


                                                    LIST OF PRACTICALS

1.         Write a program to perform swapping of values of two variables.
2.         Write a program to find whether an year entered by user is leap year or not.
3.         Write a program to print division of student using if-else and/or if-else if decision statements.  
4.         Write a program to find factorial of a number using FOR and WHILE loop.
5.         Write a function power(a,b) to calculate the value of a raised to power b.
6.         Write a function to compute area and parameter of a triangle. User should enter three sides of the triangle. Area and parameter should be printed in main.
7.         Write a function that receives marks received by a student in 3 subjects and returns the average and percentage of these marks. Call this function from main ( ) and print the results in main ( ).
8.         Write a program to search a particular element from an array. Also find number of times it appears in the array.
9.         Write a program to print array elements along with their address (using/without using) pointer.
10.     Write a function to modify values of an array to contain values which are 5 more than current values. Modified values should be printed in main ( ).
11.     Write a program to create a two dimensional array and print its elements using pointers.
12.     Write a program to find whether a string is palindrome or not. A string is said to be palindrome if we get the same string on reversing it. (For ex. “wow” is palindrome).
13.     Write a program to reverse a string. You may use a user defined function REVERSE( ) for this purpose.
14.     Write a user defined function XSTRLEN( ) for finding length of string.
15.        Write a program to show difference between structure and union. Program should differentiate based on following points:
(a) Size of structure and union variables.
(b) Memory addresses allocated to union and structure variables.
16.     Write a program to show use of array of structure. Program should allow user to enter details(name, age and roll) of five students and then print it. Structure variables should be used to enter details and pointer to structure should be used for printing the details.
17.     Write a program showing use of enumeration. Program should create a data type named ROLL which will take five values 0,1,2,3,4. Program should assign these values to variables of type ROLL and then print values of the variables. Program should also demonstrate usage of TYPEDEF.
18.     Write a program to show use of bit field. Program should print size of structure variable using (without using) bit field.



Monday, 12 October 2015

Link to download IIT video lectures on computer organization- B.Tech(ECE)-5th Sem

Dear Students,

Find attached link to download IIT video lectures on computer organization:

http://nptel.ac.in/courses/106106092/

Link to download COA book by Patterson- B.Tech(ECE)-5th Sem

Dear Students,

The COA text book mentioned in your syllabus is "Computer Organization and Design, 2nd Ed., by David A. Patterson and John L. Hennessy, Morgan 1997, Kauffmann". This book is available for free download. Find below the link to download the above book:


http://ceit.aut.ac.ir/~amirkhani/Downloads/patterson_book.pdf