SpaceX, the brainchild of visionary entrepreneur Elon Musk, has been making waves in the aerospace industry since its founding in 2002. With a mission to reduce the cost of space travel and ultimately make life multiplanetary, SpaceX has transformed the space industry with its groundbreaking innovations, reusable rockets, and ambitious projects like Mars colonization. What was once thought of as the realm of government agencies has now become a competitive field driven by private companies like SpaceX. Let’s dive into the story of how SpaceX is revolutionizing space travel and…
Read MoreCategory: Programming
HTML
HTML, or HyperText Markup Language, is the standard markup language used to create and design documents on the World Wide Web. Developed by Tim Berners-Lee and his team, HTML serves as the backbone of web content by providing a structured format for creating documents that can be displayed in web browsers. HTML uses a system of markup tags to define elements within a document, such as headings, paragraphs, lists, links, images, and more. These elements contribute to the structure and presentation of web pages. HTML works in conjunction with Cascading…
Read MoreC “Hello, World!” Program
Certainly! A “Hello, World!” program is often the first program written by beginners learning a new programming language. Here’s an example in the C programming language: This simple program uses the printf function from the stdio.h library to display “Hello, World!” on the screen. The main function is the entry point of the program, and in this case, it contains the code to print the message. The \n represents a newline character, which moves the cursor to the next line after printing. When this C program is compiled and executed,…
Read MoreC Programming: String
String: In C programming, a string is a sequence of characters terminated with a null character \0. Example: char c[] = “bangladesh”; How to declare a string? Here’s how you can declare strings: char s[5]; How to initialize strings? You can initialize strings in a number of ways. char c[] = “abcd”; char c[50] = “abcd”; char c[] = {‘a’, ‘b’, ‘c’, ‘d’, ‘\0’}; char c[5] = {‘a’, ‘b’, ‘c’, ‘d’, ‘\0’}; Assigning Values to Strings Arrays and strings are second-class citizens in C; they do not support the assignment…
Read MoreHello, World!
Code #include int main() { // printf() displays the string inside quotation printf(“Hello, World!”); return 0; } Output Hello, World! How “Hello, World!” program works? The #include is a preprocessor command that tells the compiler to include the contents of stdio.h (standard input and output) file in the program. The stdio.h file contains functions such as scanf() and printf() to take input and display output respectively. If you use the printf() function without writing #include , the program will not compile. The execution of a C program starts from the…
Read MoreC Programming: For Loop
Syntax The syntax of a for loop in C programming language is − for ( init; condition; increment ) { statement(s); } Program: #include int main () { int a; /* for loop execution */ for( a = 10; a < 20; a = a + 1 ){ printf("value of a: %d\n", a); } return 0; } Output: value of a: 10 value of a: 11 value of a: 12 value of a: 13 value of a: 14 value of a: 15 value of a: 16 value of a: 17…
Read Moreসি প্রোগ্রাম – দুটি সংখ্যার বিয়োগ ফল নির্ণয়
প্রথমে দুটি ভ্যারিয়েবল এ দুটি সংখ্যা scanf ফাংশন এর মাধ্যমে ইনপুট হিসাবে নিয়ে বিয়োগ (-) অপারেটর এর মাধ্যমে অপারেট করে এসাইন (=) অপারেটর এর মাধ্যমে result ভ্যারিয়েবলে এসাইন করতে হবে। এর পরে result ভ্যারিয়েবল প্রিন্ট করলেই দুটি সংখ্যার বিয়োগ ফল পাওয়া যাবে। #include <stdio.h> int main () { int number_1, number_2, result; printf (“\n Enter first number \t”); scanf(“%d”, & number_1); printf (” Enter second number \t”); scanf(“%d”, & number_2); result = number_1 – number_2; printf (“Subtraction is \t %d \n”, result); return 0; } নিচের প্রোগ্রামে printf ফাংশনের ভেতরেই number_1 ও…
Read MoreC Programming: While Loop
In most computer programming languages, a while loop is a control flow statement that allows code to be executed repeatedly based on a given Boolean condition. The while loop can be thought of as a repeating if statement. #include “stdio.h” int main () { int i = 0; while (i
Read MoreFactorial Number
Factorial Number: The product of an integer and all the integers below it; e.g. factorial four ( 4! ) is equal to 24. 4! = 4 × 3 × 2 × 1 = 24 Code #include <stdio.h> unsigned long long int factorial(unsigned int i) { if(i
Read Moreপাসওয়ার্ড এর C প্রোগ্রাম
এমন একটি প্রোগ্রাম লিখ, যা ব্যবহারকারীর কাছ থেকে একটি পাসওয়ার্ড নিবে। সঠিক পাসওয়ার্ড প্রদান করলে দেখাবে Successfully Log In আর যদি ভুল পাসওয়ার্ড প্রদান করে, তাহলে দেখাবে Wrong Password. যদি ৫ বার ভুল পাসওয়ার্ড দেয়, তাহলে Access Denied মেসেজ দেখাবে। প্রোগ্রামঃ #include <stdio.h> #include <stdlib.h> #include <string.h> char password[] = “1234”; char temp_password[100]; int input () { printf (“Password: “); gets (temp_password); int match = strcmp (password,temp_password); return match; } int main () { int count = 0; for (;;) { if (input () == 0) { printf (“Welcome \nLogged…
Read More