Database Management Exam  >  Database Management Videos  >  Introduction to Fortran Programming (Basic Level)  >  Fortran Programming Tutorials (Revised) : 035 : Introduction to subroutines and procedures

Fortran Programming Tutorials (Revised) : 035 : Introduction to subroutines and procedures Video Lecture | Introduction to Fortran Programming (Basic Level) - Database Management

41 videos

FAQs on Fortran Programming Tutorials (Revised) : 035 : Introduction to subroutines and procedures Video Lecture - Introduction to Fortran Programming (Basic Level) - Database Management

1. What is a subroutine in Fortran programming?
Ans. A subroutine in Fortran programming is a reusable piece of code that performs a specific task. It is a named block of code that can be called from different parts of a program to perform a particular operation. Subroutines help in organizing the code, improving code reusability, and enhancing the readability of the program.
2. How do you define and call a subroutine in Fortran?
Ans. To define a subroutine in Fortran, you need to use the SUBROUTINE keyword followed by the subroutine name. Inside the subroutine, you can write the code that performs the desired task. To call a subroutine, you can simply use the CALL statement followed by the subroutine name and any required arguments. This will transfer the control to the subroutine, execute the code, and return back to the calling program.
3. What is the difference between a subroutine and a function in Fortran?
Ans. In Fortran, a subroutine is a piece of code that performs a specific task and does not return a value, whereas a function is a piece of code that computes and returns a value. Subroutines are called using the CALL statement, while functions are called by directly using their name and assigning the returned value to a variable. Subroutines are primarily used for performing actions, while functions are used for calculations and returning results.
4. Can a subroutine call another subroutine in Fortran?
Ans. Yes, a subroutine can call another subroutine in Fortran. This is known as subroutine nesting. When a subroutine calls another subroutine, the control is transferred to the called subroutine, and after its execution, it returns back to the calling subroutine. The nesting depth can be multiple levels, allowing for complex program structures and modularity.
5. How can subroutines help in database management in Fortran programming?
Ans. Subroutines can be used in Fortran programming for efficient database management. They can be employed to perform operations such as data insertion, retrieval, modification, and deletion in a database. By encapsulating these operations within subroutines, the code becomes more modular, maintainable, and easier to understand. Subroutines also enable the reuse of code for database management tasks, leading to more efficient development and improved overall program performance.
41 videos
Explore Courses for Database Management exam
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

Previous Year Questions with Solutions

,

video lectures

,

Fortran Programming Tutorials (Revised) : 035 : Introduction to subroutines and procedures Video Lecture | Introduction to Fortran Programming (Basic Level) - Database Management

,

Fortran Programming Tutorials (Revised) : 035 : Introduction to subroutines and procedures Video Lecture | Introduction to Fortran Programming (Basic Level) - Database Management

,

Sample Paper

,

Free

,

Fortran Programming Tutorials (Revised) : 035 : Introduction to subroutines and procedures Video Lecture | Introduction to Fortran Programming (Basic Level) - Database Management

,

practice quizzes

,

Important questions

,

shortcuts and tricks

,

Semester Notes

,

pdf

,

Summary

,

Viva Questions

,

Exam

,

past year papers

,

ppt

,

MCQs

,

study material

,

Objective type Questions

,

Extra Questions

,

mock tests for examination

;