Posts

Showing posts with the label code blocks

What is sql in Deep(Structured query language). Sql Tutorial -1

What is sql in Deep(Structured query language) Oracle was the first company to release a product that used the English-based Structured Query Language, or SQL. This language allows end users to extract information themselves, without using a systems group for every little report. Oracle’s query language has structure, just as English or any other language has structure. It has rules of grammar and syntax, but they are basically the normal rules of careful English speech and can be readily understood. What is SQL QUERIES It is known as data base language. It is used to communicate with any database. We can use this language constructs to write SQL QUERIES. What is SQL* PLUS SQL * PLUS is a default client tool and acts as an interface between client and database. What is SQL It is a collection of pre defined commands and constructs with syntactical rules

you should install 'babel-loader@7'. || babel version

If you are Getting any error in compiling main.js or app.js or in Entry file of React App You have to Update Babel versions and dependency npm install -D babel-loader @babel/core @babel/preset-env webpack And change config file options: {           presets: ['@babel/preset-env']         }

File inclusion in c

There are two ways to include a file in c # include ”filename” #include<filename> 1st one  is search in  current directory  and  specify list of directory  and  it also take full qualified file name. 2nd one  is search in  specify list of director y. But It has a advantage that is it can take  multiple file Name  at a time that is separated by semicolon ( ; ). Example- #include<file 1; file 2; file 3>

Types of constants in c

There are  two  types of constants available in c language. Primary constants  - intreger constants, real constants, character constants. Secondary constants - array, pointer, structure, union, enum. etc

Exponential function in c

The exp() function computes the exponential (Euler's number) raised to the given argument. C exp() Prototype double exp(double arg); The exp(arg) takes a single argument and returns the value in type   double . — maths e^x = exp(x) [in c programming] It is defined in  <math.h> header file. EXAMPLE- #include <stdio.h> #include <math.h> int main () { double x = 12.0 , result ; result = exp ( x ); printf ( "Exponential of %.2lf = %.2lf" , x , result ); return 0 ; } Output Enter the value of x to find e ^ x : 12 Exponential of 12.00 = 162754.79

Fibonacci series without using recursion?

#include<stdio.h> #include<conio.h> void printFibonacci(int n){ static int n1=0,n2=1,n3; if(n>0){ n3 = n1 + n2; n1 = n2; n2 = n3; printf("%d ",n3); printFibonacci(n-1); } } void main(){ int n; clrscr(); printf("Enter the number of elements: "); scanf("%d",&n); printf("Fibonacci Series: "); printf("%d %d ",0,1); printFibonacci(n-2); //n-2 because 2 numbers are already printed getch(); } Enter the number of elements : 15 0 1 1 2 3 5 8 13 21 34 55 89 144 233 377

Most efficient way to store flag values?

A flag is a value used to make a decision between two or more options in the execution of a program. For instance, the /w flag on the MS-DOS dir command causes the command to display filenames in several columns across the screen instead of displaying them one per line. In which a flag is used to indicate which of two possible types is held in a union. Because a flag has a small number of values (often only two), it is tempting to save memory space by not storing each flag in its own  int  or  char . Efficiency in this case is a tradeoff between size and speed. The most memory-space efficient way to store a flag value is as single bits or groups of bits just large enough to hold all the possible values. This is because most computers cannot address individual bits in memory, so the bit or bits of interest must be extracted from the bytes that contain it. The most time-efficient way to store flag values is to keep each in its own integer variable. Unfortunately, this method can w

Are bit fields portable? || Bit fields portable

Bit fields are not portable . Because  bit fields cannot span machine words , and because the number of bits in a machine word is different on different machines, a particular program using bit fields might not even compile on a particular machine. Assuming that your program does compile, the order in which bits are assigned to bit fields is not defined. Therefore, different compilers, or even different versions of the same compiler, could produce code that would not work properly on data generated by compiled older code. Stay away from using bit fields, except in cases in which the machine can directly address bits in memory and the compiler can generate code to take advantage of it and the increase in speed to be gained would be essential to the operation of the program.

what is bit field

Image
Bit fields are used in Data Structure and it is partial size member variables inside a structure. When we use number programming that time we use Bit fields. Example- Decimal to Binary Conversion In the Bit fields left most bit is called sign bit.

C program to print Armstrong numbers from 1 to 1000?

  #include<stdio.h> #include<conio.h> void main() { int i=153,n,temp,num,r,sum=0; clrscr(); while(i<=1000) { n=i; temp=n; while(n>0) { r=n%10; sum=sum+(r*r*r); n=n/10; } if(temp==sum) { printf("the armstrong number is %d\n",sum); } i++; } getch(); }

Why do code blocks only work when installed in the C drive, and not in any other drive?

its depends on in which drive your OS and other things related to it, is installed in C drive.when we install code blocks internal process fetch the full qualified name of some file that is already install in our system. thats why we have to install it in c drive. ex—its same as the packaging in java. when we import source code of another file into a current file, when both files is in same folder we do not need to do packaging. if files are in different folder or directory then we have to called it by its full qualified name. same its done with the code blocks