Saturday, December 31, 2016

MODULAR PROGRAMMING FILE HANDLING C LANGUAGE THEORY QUESTIONS COLLECTION [3 MARKS]



MODULAR PROGRAMMING FILE HANDLING C LANGUAGE THEORY QUESTIONS COLLECTION [3 MARKS]


  • 1.     Define Modular Programming.
  • 2.     Write any two advantages of modular programming.
  • 3.     Write any two disadvantages of modular programming.
  • 4.     Define procedure.
  • 5.     Mention the types of procedure.
  • 6.     Write down the difference between function procedure and sub procedure.
  • 7.     What is loop?
  • 8.     What is variable?
  • 9.     Differentiate between user defined function and in-built function.
  • 10.  What do you mean by local variable and global variable?
  • 11.  Define parameter and argument.
  • 12.  Write the syntax and example of SUB….END SUB and FUNCTION…END FUNCTION statement.
  • 13.  Explain accumulator with an example.
  •  
  •  
  • 1.     List any four data types used in C language.
  • 2.     List any two features / characteristics of C language.
  • 3.     Write any two differences between QBasic and C language.
  • 4.     Write any two similarities between QBasic and C language.
  • 5.     Write any two advantages of structured programming language.
  • 6.     Why is C called structured programming language / procedural oriented program?
  • 7.     When and Who developed C language?
  • 8.     Define keyword. How many keywords are there in C language?
  • 9.     Define Unary Operator.

  • 1.     What is meant by mode of data file?
  • 2.     Define program file and data file.

  • Write the functions of:

  • 1.     MKDIR
  • 2.     NAME
  • 3.     CLOSE
  • 4.     KILL
  • 5.     RMDIR
  • 6.     EOF
  • 7.     FILES
  • 8.     CALL
  • 9.     OPEN
  • 10.  SHARED



  • 1.     INPUT
  • 2.     INPUT #
  • 3.     LINE INPUT#
  • 4.     SHELL
  • 5.     WRITE #
  • 6.     PRINT #
  • 7.     INPUT $
  • 8.     COMMON SHARED
  • 9.     VAL
  • 10.  CINT


QBASIC NUMBER SERIES PROGRAM 2, 4, 8, 14, 22, ………UP TO 15th TERM

 QBASIC NUMBER SERIES PROGRAM 
2, 4, 8, 14, 22, ………UP TO 15th  TERM

DECLARE SUB SERIES ( )
CLS
CALL SERIES
END

SUB SERIES
A = 2
B = 2
FOR I = 1 TO 15
    PRINT A,
    A = A + B
    B = B + 2
NEXT I
END SUB

Friday, December 30, 2016

Qbasic Program that accept the full name of the person and display the initial character of the first name and middle name with full family name.(eg.Meg Bahadur Thapa as M.B.Thapa)

Write a QBasic Program that accept the full name of the person and display the initial character of the first name and middle name with full family name.(eg.Meg Bahadur Thapa as M.B.Thapa)

CLS
INPUT "ENTER FULL NAME"; A$
B$ = LEFT$(A$, 1)
FOR J = 1 TO LEN(A$)
    C$ = MID$(A$, J, 1)
    IF C$ = " " THEN B$ = B$ + "." + MID$(A$, J + 1, 1)
NEXT J

FOR I = LEN(A$) TO 1 STEP -1
    D$ = MID$(A$, I, 1)
    F = F + 1
    IF D$ = " " THEN
        E$ = E$ + RIGHT$(A$, F - 2)
        EXIT FOR
    END IF
NEXT I

PRINT B$ + E$
END