D

@Dheerendra

Sorting in an array

C
3 years ago
#include<stdio.h> int main(){ int a[]={12,3,4,5,6}; int l=sizeof(a)/sizeof(a[0]); printf("Size of array : %d",l); printf("\nBefore sorting \n"); for(int i2 = 0;i2<l;i2++){ printf("%d\t",a[i2]); }

factorial in Cpp

C++
3 years ago
#include<iostream> using namespace std; int factor(int a){ int p=1; int n=a; while(n>0){ p=p*n; n=n-1; } return p;

PL/Sql-Letter_or_digit

SQL
3 years ago
-- 01)letter or digit DECLARE v_char CHAR(1) ; v_result VARCHAR(30); BEGIN v_char:=:v_char; IF (v_char >= 'A' AND v_char <= 'Z') or (v_char >='a' And v_char <='z') THEN v_result := 'Letter'; ELSIF v_char >= '0'

PL/Sql-Simple_Interest

SQL
3 years ago
-- 02)Simple interest Declare p int; r int; t int; q int; s float; e exception;

Trigger-02

SQL
3 years ago
create table main2(Name varchar(256), marks int); insert into main2(Name, marks)values('Dheerendra',87); insert into main2(Name, marks)values('Jitendra',97); select * from main2; create table backup2(Name varchar(256), marks int); create or

06may/)Trigger-01

SQL
3 years ago
create or replace trigger tu before delete on main for each row begin Insert into backup values(:old.id, :old.salary); end; / delete from main where id=1;

Hackerrank_CA_03-02.c

C
3 years ago
#include<stdio.h> #include<stdlib.h> int main(){ int n; scanf("%d",&n); // constraints if(n<0 || n>50){ printf("Invalid Input \nEnter a positive number and less than 50");

hackerrank_CA_03-01.c

C
3 years ago
#include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> int main() { int n,i,Estud=0,Ostud=0; float Even=0,Odd=0; scanf("%d",&n); if(n>10){

3may)Lecture-05.c

C
3 years ago
#include <stdio.h> int main () { char a[20],b[20]; int i; scanf("%[^\n]%*c",a); printf("%s",a); la=strlen(a); lb=strlen(b);

3may)Lecture-05.c

C
3 years ago
#include <stdio.h> int main () { char str1[50],str2[30]; printf("Enter a string : \n"); gets(str1); printf("You entered using gets : %s", str1); fgets(str2,30,stdin);

3may)Lecture-04.c

C
3 years ago
#include <stdio.h> int main() { char first_string[20]; char second_string[20]; int i; printf("Enter the first string"); scanf("%s",first_string); printf("\nEnter the second string"); scanf("%s",

3may)Lecture-03.c

C
3 years ago
// copying of string using for loop #include <stdio.h> #include<string.h> int main() { char a[20],b[20],c[40]; int i,la,lb; scanf("%[^\n]%*c",a); scanf("%[^\n]%*c",b);

3may)Lecture-03.c

C
3 years ago
// copying of string using for loop #include <stdio.h> #include<string.h> int main() { char a[20],c[20]; int i,l; scanf("%[^\n]%*c",a); l=strlen(a);

3may)Lecture-03.c

C
3 years ago
// length of string using for loop #include <stdio.h> #include<string.h> int main() { char a[20],b; int i,l=0; scanf("%[^\n]%*c",a); l=strlen(a);

3may)Lecture-03.c

C
3 years ago
// length of string using for loop #include <stdio.h> #include<string.h> int main() { char a[20]; int i,l=0; scanf("%[^\n]%*c",a); for(i=0;a[i]!='\0';i++){

01)Case in sql

SQL
3 years ago
DECLARE grade CHAR(1) := 'B'; appraisal VARCHAR2(20); BEGIN appraisal := CASE grade WHEN 'A' THEN 'Excellent' WHEN 'B' THEN 'Very Good' WHEN 'C' THEN 'Good' WHEN 'D' THEN 'Fair'

01)Reverse a number in sql

SQL
3 years ago
declare -- declare variable n, m, temp -- and temp of datatype number n number; m number; temp number:=0; rem number; begin

01)Palindrome in sql

SQL
3 years ago
declare -- declare variable n, m, temp -- and temp of datatype number n number; m number; temp number:=0; rem number; begin

01)Prime in sql

SQL
3 years ago
declare a int; x int; divcount int; begin a:=:a; divcount:=0; for x in 1..a loop if (mod(a,x)=0) then

Hackerrank-01.c

C
3 years ago
#include <stdio.h> int main() { int a,b,i; scanf("%d\n%d\n",&a,&b); i=a; for(i=a;i<=b;i++){ if(i<10){ switch(i){ case 1: printf("one\n");