Welcome

C++ PROGRAMS

C++ Program to output an integer, a floating point number and a character

Program:-
#include <iostream.h>
#include <conio.h>


void main()
{
  clrscr();
  int x = 10;
  float y = 10.1;
  char z = 'a';
  cout << "x = " << x << endl;
  cout << "y = " << y << endl;
  cout << "z = " << z << endl;
  getch();
}
This program has pre-defined values for an integer x, floating point number y, and a character z.
These three values are outputted using the 'cout' command.

UNIX & SHELL PROGRAMMING LAB ASSIGNMENT 4TH SEM SOLUTIONS

1. Use the echo command to display the line UNIX is fun to learn
Ans :- echo "UNIX is fun to learn"

Redirect the displayed line to a file. Append the outputs of the commands to show the users logged into your system, your login account and the current date in the dd-mm-yyyy format to the file.
Ans :-who -u | cat > myfile
date +'%d-%m-%Y' | cat > myfile

2. Assuming you have a directory containing the following files:
sprite, cola, choco, orange, book, lemon, lotus, apple
Use the ls command to list only those files that
a) consist of four letters
b) begin with the letter c
c) end with the letter e
d) have the second letter o
a)Ans :- ls ????
b)Ans :- c*.*
c)Ans :- *c.*
d)Ans :- ?o.*