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



Sunday, 11 October 2015

FOC assignment for B.Tech(1st year) students

Dear students,

Find attached assignment on function, pointer and array. Submission deadline is 19th of october. Solution of this assignment will be posted on 20th of october.

   
LEVEL: EASY

1.               Write a program to print array elements along with their address without using pointer.

2.               Write a function to print array elements making use of pointer (base address of array).

3.           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 ( ).

4.               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 ( ).



LEVEL: MEDIUM


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 program to search a particular element from an array. Also find number of times it appears in the array.

                                                       

                                                          LEVEL: HARD

8.               Write a recursive function to obtain running sum of first 25 natural numbers.

9.              A positive number is entered through the keyboard. Write a function to find binary equivalent of this number.

10.           Write a program to create a two dimensional array and print its element without using pointer.

11.           Write a program to create a two dimensional array and print its element using pointers.

 Write a program to create array of pointers and use this array to store addresses and print values stored at those addresses.  

Sunday, 4 October 2015

List of toppers

Glad to announce the names/roll no. of students who have topped in their first minor.:


ROLL

NAME
CLASS
MARKS(OUT OF 20)
13152112

Surbhi Taak
B.Tech (ECE) 5th sem-Batch II (CAO)
17
15014024

Pragya
B.Tech(IT)-1st sem
(FOC)
18
13152911
_
B.Tech (ECE) 5th sem-Batch I (CAO)
17

Friday, 2 October 2015

Acknowledgement to all my students of GJUS&T

Dear Students,

Greetings to you all.

I have started this blog to help you all in any possible manner I can. I am happy to announce and initiate this blog which will serve several purposes. Some of which include:

1. Sharing many useful links related to your studies.
2. Uploading study material and assignments.
3. Uploading your minor marks.
4. Clearing your doubts related to classroom teaching.
5. Uploading educational videos.
and many more.

I hope you all find this blog useful. I also expect wide participation from your side and at the same time instruct you not to post any kind of nuisance comments anywhere on this blog. Healthy comments and suggestions will always be appreciated. 

Thanking you all,



With best regards,

Amarnath Pathak
Faculty,
Department of Computer Science & Engineering
GJUS&T, Hisar, Haryana
amar4gate@gmail.com