What do you want to save?
Add Code snippet
New code examples
-
C 2022-03-27 21:35:04
Write a c code to create a data base of students using structure. The member variables are roll, grade, and marks. Create 3 structure variable of 3 different roll numbers and find out the roll number of the student who is having highest marks.
#include <stdio.h> struct student { char firstName[50]; int roll; float marks; } s[10]; int main() { int i; printf("Enter information of students:\n"); // storing information for (i = 0; i < 5; ++i) { ... Add solution -
Other 2022-03-27 16:15:33
array of array in c
#include <stdio.h> int main(void) { int size, i; printf("Enter the size of the arrays:\n"); scanf("%d", &size); int arr1[size]; printf("Enter the elements of the array:\n"); for (i = 0; i < size; i++) { scan... Add solution -
C 2022-03-24 20:20:01
C printf to string
// int sprintf(char *str, const char *format, ...); char *printf_to_string() { char buffer[128] = {0} //Must be big enough // writing printf output in buffer sprintf(buffer, "some %s here...\n", "text"); // duplicate if needed... Add solution -
Assembly 2022-03-22 20:55:01
printf format specifiers c
/* printf example */ #include <stdio.h> int main() { printf ("Characters: %c %c \n", 'a', 65); printf ("Decimals: %d %ld\n", 1977, 650000L); printf ("Preceding with blanks: %10d \n", 1977); printf ("Pr... Add solution