Skip to main content

Cloud computing in engineering workflows

Cloud Computing in Engineering Workflows:   Transforming Design, Collaboration, and Innovation In today’s fast-paced engineering landscape, the need for speed, scalability, and seamless collaboration is greater than ever. Traditional engineering workflows often relied on on-premises servers, powerful local machines, and fragmented communication tools. But as projects grow in complexity and teams become more global, these systems can no longer keep up. This is where cloud computing steps in—reshaping how engineers design, simulate, collaborate, and deliver results. What is Cloud Computing in Engineering? Cloud computing refers to the use of remote servers hosted on the internet to store, process, and analyze data. Instead of being limited by the hardware capacity of a single computer or office server, engineers can leverage vast, scalable computing resources from cloud providers. This shift enables engineers to run simulations, share designs, and manage data more efficiently. Key Be...

Input and Output Functions

INPUT AND OUTPUT FUNCTIONS
The most fundamental operation in a C program is to accept input values from a standard input device and output the data produced by the program to a standard output device. we can assign values to variables using the assignment operator ‘=’. For example,
int a = 3;
What if we want to assign value to variable a that is inputted from the user at run-time? This is done by using the scanf function that reads data from the keyboard. Similarly, for outputting results ofthe program, printf function is used that sends results to a terminal. Like printf and scanf, there are different functions in C that can carry out the input–output operations. These functions are collectively known as Standard Input/ Output Library. A program that uses standard input/output functions must contain the following statement at the beginning of the program:
#include <stdio.h>

scanf()
The scanf()function is used to read formatted data from the keyboard. The syntax of the scanf() function can be given as,
scanf ("control string", arg1, arg2, arg3...argn);
The control string specifies the type and format of the data that has to be obtained from the keyboard and stored in the memory locations pointed by the arguments, arg1, arg2, ...,argn. The prototype of the control string can be given as,
%[*][width][modifier]type
* is an optional argument that suppresses assignment of the input field. That is, it indicates that data should be read from the stream but ignored (not stored in the memory location).
width is an optional argument that specifies the maximum number of characters to be read. However, if the scanf function encounters a white space or an unconvertible character, input is 
terminated.
modifier is an optional argument (h, l, or L), which modifies the type specifier. 
Modifier h is used for short int or unsigned short int, l is used for long int, unsigned long int, or double values. Finally, L is used for long double data values.
type specifies the type of data that has to be read. It also indicates how this data is expected to be read from the user. The type specifiers for scanf function are given Table :  Type specifiers
Type      Qualifying Input
%c           For single characters
%d,          %i For integer values
%e,          %E,%f,%g,%G For floating point  numbers
%o            For octal numbers
%s             For a sequence of (string of) characters
%u             For unsigned integer values
%x,%X       For hexadecimal values
The scanf function ignores any blank spaces, tabs, and newlines entered by the user. The function simply returns the number of input fields successfully scanned and stored.
As we have not studied functions till now, understanding scanf function in depth will be a bit difficult here, but for now just understand that the scanf function is used to store values in memory locations associated with variables. For this, the function should have the address of the variables. The address of the variable is denoted by an & sign followed by the name of the variable. Look at the following code that shows how we can input value in a variable of int data type:
int num;
scanf(" %4d ", &num);
The scanf function reads first four digits into the address or the memory location pointed by num.

printf()
The printf function is used to display information required by the user and also prints the values of the variables. Its syntax can be given as:
printf ("control string", arg1,arg2,arg3,...,argn);
After the control string, the function can have as many arguments as specified in the control string. The control string contains format specifiers which are arranged in the order so that they 
correspond with the arguments in the variable list. It may also contain text to be printed such as instructions to the user, identifier names, or any other text to make the text readable.
Note that there must be enough arguments because if there are not enough arguments, then the result will be completely unpredictable. However, if by mistake you specify more number of 
arguments, the excess arguments will simply be ignored. The prototype of the control string can be given as below:
%[flags][width][.precision][modifier]type
Each control string must begin with a % sign. 
flags is an optional argument, which specifies output justification like decimal point, numerical sign, trailing zeros or octadecimal or hexadecimal prefixes. Below Table shows different types of flags with their descriptions.
Table : Flags in printf()
Flags      Description
–             Left–justify within the given field width
+             Displays the data with its numeric sign (either + or –)
#           Used to provide additional specifiers like o, x, X, 0, 0x, or 0X for
octal and hexadecimal values respectively for values different than zero
0          The number is left–padded with zeroes (0) instead of spaces.
width is an optional argument which specifies the minimum number of positions that the output characters will occupy. If the number of output characters is smaller than the specified width, then the output would be right justified with blank spaces to the left. However, if the number of characters is greater than the specified width, then all the characters would be printed.
precision is an optional argument which specifies the number of digits to print after the decimal point or the number of characters to print from a string. 
modifier field is same as given for scanf() function. 
type is used to define the type and the interpretation of the value of the corresponding argument. 
The type specifiers for printf function are given 
The most simple printf statement is
printf ("Welcome to the world of C language");
The function when executed prompts the message enclosed in the quotation to be displayed on the screen.
For float x = 8900.768, the following examples show output under different format specifications:
printf ("%f", x) 8 9 0 0 . 7 6 8
printf("%10f", x); 8 9 0 0 . 7 6 8
printf("%9.2f", x); 8 9 0 0 . 7 7
printf("%6f", x); 8 9 0 0 . 7 6 8

Popular posts from this blog

Abbreviations

No :1 Q. ECOSOC (UN) Ans. Economic and Social Commission No: 2 Q. ECM Ans. European Comman Market No : 3 Q. ECLA (UN) Ans. Economic Commission for Latin America No: 4 Q. ECE (UN) Ans. Economic Commission of Europe No: 5 Q. ECAFE (UN)  Ans. Economic Commission for Asia and the Far East No: 6 Q. CITU Ans. Centre of Indian Trade Union No: 7 Q. CIA Ans. Central Intelligence Agency No: 8 Q. CENTO Ans. Central Treaty Organization No: 9 Q. CBI Ans. Central Bureau of Investigation No: 10 Q. ASEAN Ans. Association of South - East Asian Nations No: 11 Q. AITUC Ans. All India Trade Union Congress No: 12 Q. AICC Ans. All India Congress Committee No: 13 Q. ADB Ans. Asian Development Bank No: 14 Q. EDC Ans. European Defence Community No: 15 Q. EEC Ans. European Economic Community No: 16 Q. FAO Ans. Food and Agriculture Organization No: 17 Q. FBI Ans. Federal Bureau of Investigation No: 18 Q. GATT Ans. General Agreement on Tariff and Trade No: 19 Q. GNLF Ans. Gorkha National Liberation Front No: ...

Operations on data structures

OPERATIONS ON DATA STRUCTURES This section discusses the different operations that can be execute on the different data structures before mentioned. Traversing It means to process each data item exactly once so that it can be processed. For example, to print the names of all the employees in a office. Searching It is used to detect the location of one or more data items that satisfy the given constraint. Such a data item may or may not be present in the given group of data items. For example, to find the names of all the students who secured 100 marks in mathematics. Inserting It is used to add new data items to the given list of data items. For example, to add the details of a new student who has lately joined the course. Deleting It means to delete a particular data item from the given collection of data items. For example, to delete the name of a employee who has left the office. Sorting Data items can be ordered in some order like ascending order or descending order depending ...

The Rise of Solar and Wind Energy: A Glimpse into a Sustainable Future

In the quest for a sustainable future, solar and wind energy systems have emerged as two of the most promising sources of renewable energy. As concerns about climate change and the depletion of fossil fuels grow, these technologies offer a pathway to a cleaner, more resilient energy grid. This blog post delves into the significance of solar and wind energy, their benefits, challenges, and the role they play in shaping a sustainable future. The Basics of Solar and Wind Energy Solar Energy Systems harness the power of the sun to generate electricity. The most common technology used is photovoltaic (PV) panels, which convert sunlight directly into electricity. Solar thermal systems, another approach, use mirrors or lenses to concentrate sunlight, generating heat that can be used to produce electricity. Solar energy is abundant, renewable, and available almost everywhere on Earth. Wind Energy Systems utilize wind turbines to convert the kinetic energy of wind into electrical energy. Thes...