Skip to content

added data-types and their range #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Standard_Template_Library(stl)/Miscellaneous.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Miscellaneous Knowleadge:

1. *p = *q, this statement copies all the content of q into p.
Use of this statement:

Ques - You are given a pointer/ reference to the node which is to be deleted from the linked list of N nodes. The task is to delete the node. Pointer/ reference to head node is not given.
Note: No head reference is given to you.
This question has been asked in Amazon, Google, Microsoft, Samsung.

Ans -

*node = *(node -> next);
// Where node is pointer to the element that needed to be deleted

Now, node has data of next node and refer to the next to next node.





28 changes: 28 additions & 0 deletions Standard_Template_Library(stl)/data-types and their range
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
DATA TYPE SIZE (IN BYTES) RANGE
short int 2 -32,768 to 32,767 (-3*e4 to +3*e4)

unsigned short int 2 0 to 65,535 ( 0 t0 6*e4 )

unsigned int 4 0 to 4,294,967,295 ( 0 to 4*e9)

int 4 -2,147,483,648 to 2,147,483,647 (-2*e9 to 2*e9)

long int 4 -2,147,483,648 to 2,147,483,647 (-2*e9 to 2*e9)

unsigned long int 4 0 to 4,294,967,295 ( 0 to 4*e9)

long long int 8 -(2^63) to (2^63)-1 (-9*e18 to +9*e18)

unsigned long long int 8 0 to 18,446,744,073,709,551,615 ( 0 t0 e19)

signed char 1 -128 to 127

unsigned char 1 0 to 255

float 4

double 8

long double 12

wchar_t 2 or 4 1 wide character