B

@burningphoenix

Palindrome number and string

C
2 years ago
#include <stdio.h> #include <string.h> int is_Palindrome_String(const char* str) { int len = strlen(str); int i, j; for (i = 0, j = len - 1; i < j; i++, j--) { if (str[i] != str[j]) { return 0; // Not a palindrome

Variadic functions in C

C
2 years ago
#include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <time.h> #define MIN_ELEMENT 1 #define MAX_ELEMENT 1000000 int sum(int count, ...) { int total = 0;

Dynamic Array in C

C
2 years ago
#include <stdio.h> #include <stdlib.h> /* * This stores the total number of books in each shelf. */ int* total_number_of_books; /* * This stores the total number of pages in each book of each shelf.

Digit Frequency

C
2 years ago
#include <stdio.h> int main() { char s[1000]; int digitFreq[10] = {0}; // Array to store frequency of digits (0-9) int i; printf("Enter a string: "); fgets(s, sizeof(s), stdin);

Printing Tokens

C
2 years ago
#include <stdio.h> int main() { char sentence[1000]; int i; fgets(sentence, sizeof(sentence), stdin);

reversed array

C
2 years ago
#include <stdio.h> #include <stdlib.h> int main() { int num, *arr, i; scanf("%d", &num); arr = (int*) malloc(num * sizeof(int)); for(i = 0; i < num; i++) { scanf("%d", arr + i); }

sum of array

C
2 years ago
#include <stdio.h> int main() { int size, i; int sum = 0; scanf("%d", &size); int array[size];

pattern

C
2 years ago
#include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> void printPattern(int n) { int size = 2 * n - 1; int matrix[size][size];

1d array

C
2 years ago
// Online C compiler to run C program online #include <stdio.h> int main() { int i; int nums[5]; printf("\n runtime initialization example:\n"); printf("enter array ellements\n"); for(i =0;i<5;i++){ scanf("%d",&nums[i]);

infinite loop

C
2 years ago
#include <stdio.h> int main() { int i, n; printf("Enter a number greater than 4: "); scanf("%d", &n); for (i = 0; i <= n; i++) { // Loop body

book

C++
3 years ago
#include<iostream> using namespace std; class weight { int kilogram; int gram; public: void getdata(); void putdata(); weight sum_weight(weight);

final test

SQL
3 years ago
CREATE TABLE student ( name VARCHAR(50), registration INT, phone_number INT ); INSERT INTO student (name, registration, phone_number) VALUES ('aryan', 12222547, 8737539750), ('mohit', 1224857, 8775934878), ('rohit', 1232994, 8779879897),

CA3

SQL
3 years ago
CREATE TABLE employees ( last_name CHAR NOT NULL, first_name CHAR NOT NULL, email VARCHAR(20), phone_number INT, job_id VARCHAR, salary FLOAT, manager_id INT, manager_name CHAR, department_id VARCHAR

CA4

SQL
3 years ago
CREATE TABLE employees ( last_name CHAR NOT NULL, first_name CHAR NOT NULL, email VARCHAR(20), phone_number INT, job_id VARCHAR, salary FLOAT, manager_id INT, manager_name CHAR, department_id VARCHAR

Mercedes-Benz

C++
3 years ago
/*Write a program that defines a base class Vehicle with a constructor that takes a make and model parameter. Derive two classes Car and Truck from Vehicle, each with a constructor that takes additional parameters. Implement a virtual function printInfo() in the base class that prints the make and model of the vehicle, and override the function in the derived classes to include additional information specific to cars and trucks. Create an array of Vehicle pointers and populate it with instan

course_grades

SQL
3 years ago
CREATE TABLE course_grades ( ID INT, course_id VARCHAR(10), sec INT, semester VARCHAR(10), year INT, grade CHAR(2), name VARCHAR(20), dept_name VARCHAR(20), tot_cred INT

course_grades

SQL
3 years ago
CREATE TABLE course_grades ( ID INT, course_id VARCHAR(10), sec INT, semester VARCHAR(10), year INT, grade CHAR(2), name VARCHAR(20), dept_name VARCHAR(20), tot_cred INT

ford musthang

C++
3 years ago
#include <iostream> using namespace std; // base class class vechicle { public: string brand = "ford"; void honk() { cout<< "welcome in\n"; }

find area of rectangle using constructor sir

C++
3 years ago
/* program to find area of rectangle using constructor*/ #include <iostream> using namespace std; class CRectArea{ private: int length; int breadth; public: CRectArea (int,int); int areaofrect()

program to find area of rectangle using constructor

C++
3 years ago
#include <iostream> using namespace std; class CRectArea { public: CRectArea(int length, int breadth) { m_length = length; m_breadth = breadth; } int area() {