Anonymous Poll
12%
10
37%
20
39%
11
17%
21
π1
Anonymous Poll
16%
1
45%
2
28%
compiler error
16%
runtime error
π1
Error handling during file operations in C/C++
β It is quite common that errors may occur while reading data from a file in C++ or writing data to a file.
Below are some Error handling functions during file operations in C/C++:
Β»sample code: https://t.me/learntocodecpp/454
Β»sample code: https://t.me/learntocodecpp/457
The function
Β»sample : https://t.me/learntocodecpp/458
β It is quite common that errors may occur while reading data from a file in C++ or writing data to a file.
Below are some Error handling functions during file operations in C/C++:
ferror():
β€οΈThe ferror() function checks for any error in the stream. It returns a value zero if no error has occurred and a non-zero value if there is an error. Β»sample code: https://t.me/learntocodecpp/454
clearerr():
π€The function clearerr() is used to clear the end-of-file and error indicators for the stream.Β»sample code: https://t.me/learntocodecpp/457
The function
perror()
π€stands for print error. In case of an error, the programmer can determine the type of error that has occurred using the perror() function.Β»sample : https://t.me/learntocodecpp/458
Travel agency managnment system by using oop PROJECT.cpp
15.7 KB
project one:<source AAU>
Q1.......is the standard markup language for creating webpages
Anonymous Quiz
12%
Python
7%
C++
78%
Html
4%
C#
the end tag for the HTML element <br> is:
Anonymous Quiz
52%
</br>
11%
</p>
21%
<br> itself
16%
none
Java how to program late objects in... (z-lib.org).pdf
8.4 MB
Object oriented programming>OOPπππΏ
π3
Can you take a second to vote the poll to easy our notes and meets you well, which grade are you categorized in?
Anonymous Poll
8%
High school student
32%
Freshman student
63%
Bsc student
5%
Others
EvoNext
π»LESSON2πβοΈ #Compiling a Program Compiling converts the source files that you write into bytecode that can be executed by a Java Virtual Machine. The source file has a #.java extension. It also defines a public class of the same name. For example, the classβ¦
LESSON 3
ASSIGNMENT
β > Every variables is assigned data type that designates the type and quantity of value it can hold.
β³οΈ<> as many of you guess , variable is a name given to a memory location.
βοΈDuring declaration of a variable, we nedd to take care of two things
1. Dataype
2. Dataname
Similarly , we can initialize variables by assigning values in two ways:
1.variable initialization//
2. Assigning value by taking input from user//
/look the snippet code below with different dataypes and initializations
ASSIGNMENT
β > Every variables is assigned data type that designates the type and quantity of value it can hold.
β³οΈ<> as many of you guess , variable is a name given to a memory location.
βοΈDuring declaration of a variable, we nedd to take care of two things
1. Dataype
2. Dataname
Similarly , we can initialize variables by assigning values in two ways:
1.variable initialization//
2. Assigning value by taking input from user//
/look the snippet code below with different dataypes and initializations
public class Firsta {
public static void main(String[] args) {
long x = 2345267;
float y =3.45f;
boolean z = true;
char ch = '@';
String str ="learn to code!!";
System.out.println("the number is: " +x);
System.out.println(y);
System.out.println(z);
System.out.println(ch);
System.out.println(str);#Q1, From the statements given below, select the choice which assigns a value to X ?
Anonymous Poll
23%
X ++;
28%
Y = X;
26%
X == Y;
27%
None
π5
EvoNext
LESSON 3 ASSIGNMENT β
> Every variables is assigned data type that designates the type and quantity of value it can hold. β³οΈ<> as many of you guess , variable is a name given to a memory location. βοΈDuring declaration of a variable, we nedd to takeβ¦
LESSON 4:
IMPORTING SCANNER CLASS IN | JAVA
π¨π½βπ»Scanner is a class in java.util package used for obtaining the input of the primitive types like int, double, etc. and strings.
β³οΈTo read numerical values of a certain data type XYZ, the function to use is nextXYZ().
β To read strings, we use nextLine().
π±To read a single character, we use next().charAt(0). next() function returns the next token/word in the input as a string and charAt(0) function returns the first character in that string.
Β» GROUP To cONTRIBUTE YOUR SKILL
IMPORTING SCANNER CLASS IN | JAVA
π¨π½βπ»Scanner is a class in java.util package used for obtaining the input of the primitive types like int, double, etc. and strings.
β³οΈTo read numerical values of a certain data type XYZ, the function to use is nextXYZ().
β To read strings, we use nextLine().
π±To read a single character, we use next().charAt(0). next() function returns the next token/word in the input as a string and charAt(0) function returns the first character in that string.
import java.util.Scanner;
public class Firsta {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("enter some String");
String name = scanner.nextLine();
System.out.println("enter your age");
int x = scanner.nextInt();
scanner.nextLine();
System.out.println("what is you departent? ");
String dep =scanner.nextLine();
System.out.println("your name is: "+name);
System.out.println("your age is:"+ x);
System.out.println("your in "+dep+" departement now!");
}
}
Β» share and join this channel andΒ» GROUP To cONTRIBUTE YOUR SKILL
π2
Q2: Which is the correct syntax to declare scanner class object?
Anonymous Poll
13%
Scanner objectName = Scanner():
23%
Scanner objectName =new Scanner():
13%
Scanner objectName = Scanner(System.in):
58%
Scanner objectName =new Scanner(System.in):
13%
NONE
OOP worksheet.pdf
30 KB
WORKSHEET FOR JAVA |LEARN TO CODE
https://t.me/PROGRAMINGLANGUAGES1
SHARE FOR MORE PROGRAMMING MATERIALS : thanks
https://t.me/PROGRAMINGLANGUAGES1
SHARE FOR MORE PROGRAMMING MATERIALS : thanks