Answers for "c"

13

c

#include <stdio.h>

int main() {
   printf("Hello, world!");
   return 0;
}
Posted by: Guest on July-16-2020
1

c

C is bad. JS > Py > C
Posted by: Guest on March-11-2021
2

C

#include <stdio.h>

int main (int argc, char * argv[])
{
    int i = 0;
    int list[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
    int run = 1;
    int length_of_list; // the number of elements that the list contains
    length_of_list = sizeof(list) / sizeof(int); // getting the number
    
    while (run){ //printing the list
    printf("The list is: %d\n", list[i]);
    i = i + 1;
    if (i == length_of_list){ //check if the list has ended
        printf("The list has ended!\n");
        break; // exit the loop
    } 
    }

    return 0;
}
Posted by: Guest on July-02-2021
12

c

/* Answer to: "c" */

/*
  To learn about the letter 'C' you go to the Wikipedia:
  https://en.wikipedia.org/wiki/C
  ...but this is a Chrome Exstention for developers:

  C is a general-purpose, procedural computer programming language
  supporting structured programming, lexical variable scope, and
  recursion, while a static type system prevents unintended
  operations.
  
  Here's the Wikipedia:
  https://en.wikipedia.org/wiki/C_(programming_language)
*/
Posted by: Guest on April-17-2020
1

c

#include <stdio.h>

//main() is the main function for C
int main(){
	
	//int defines an integer variable
	int txt;

	//scanf() inputs the value you give it
	//%d defines that the value is an integer
	//& indicates that you're inputting a variable
	scanf("%d",&txt);

	//printf() outputs the value you give it
	//the %d is our "txt" variable, assigned by putting ",txt"
	printf("%d",txt);

	//return 0 indicates the end of the script
	return 0;
}

//P.S. always remember to put semicolons at the end of a line ;)
Posted by: Guest on November-17-2020
0

c

C/C++ - General-purpose language with a bias toward system 
programming and embedded, resource-constrained software.
C++'s Awesome List
https://github.com/fffaraz/awesome-cpp#readme
C's Awesome List
https://github.com/aleksandar-todorovic/awesome-c#readme
Posted by: Guest on January-02-2021
0

C

protected override void OnModelCreating(ModelBuilder modelBuilder)
{
    modelBuilder.Entity<Author>().HasData(
        new Author
        {
            AuthorId = 1,
            FirstName = "William",
            LastName = "Shakespeare"
        }
    );
}
Posted by: Guest on August-20-2021
0

c

111 result = 710
   -------
101)100101
    −101
     ---
     1000
     −101
      ---
       111
      −101
       ---
        10 remainder = 210
       ---
Posted by: Guest on June-16-2021
0

c

#a fun little package for Python 
pip install pythonnet

# The package allows the use of c# dll files to be used in python
# Note works only for the .Net Framework

example code:

	import os
	import clr
	pwd = os.getcwd()+"/"
    # remeber the 2 files have to in the same dir
	clr.AddReference(pwd+"PythonTest1.dll")
    # PythonTest1 is also my namespce
    # remeber to import the name space to be able to import the
    # Class or methods or other thing
    # Yes other things, you can do a lot with this LIB
	from PythonTest1 import Calculator

	cl = Calculator() #Class Name
	print("Add "+str(cl.add(1, 1)))
	print("sub "+str(cl.subtract(1, 19999999)))
Posted by: Guest on February-24-2021
0

c

Nobody put anything for C, so might as well be the first :)
Posted by: Guest on April-30-2021

Browse Popular Code Answers by Language