I'm programming in C and wonder if it's possible to assign multiple values at once to a multi-dimensional array? I have tried some technique but all have failed! I’m NOT interested to loop through the array to assign values (I want the fasted way to assign new values to all index in the array). The array I’m working with: ary[4][4].
How to assign multiple values at once to multi-dimensional array AFTER creating it - in C?
5.7k Views Asked by user1564762 At
2
There are 2 best solutions below
Related Questions in C
- Passing arguments to main in C using Eclipse
- kernel module does not print packet info
- error C2016 (C requires that a struct or union has at least one member) and structs typedefs
- Drawing with ncurses, sockets and fork
- How to catch delay-import dll errors (missing dll or symbol) in MinGW(-w64)?
- Configured TTL for A record(s) backing CNAME records
- Allocating memory for pointers inside structures in functions
- Finding articulation point of undirected graph by DFS
- C first fgets() is being skipped while the second runs
- C std library don't appear to be linked in object file
- gcc static library compilation
- How to do a case-insensitive string comparison?
- C programming: Create and write 2D array of files as function
- How to read a file then store to array and then print?
- Function timeouts in C and thread
Related Questions in ARRAYS
- Two different numbers in an array which their sum equals to a given value
- how to fill out the table with next values in array with one button
- How to sort a multi-dimensional array by the second array in descending order?
- Looping over defined array elements in Fortran
- Array appending after each onclick and loop in javascript
- PHP : How can I check Array in array?
- store numpy array in mysql
- Java Assign a Value to an array cell
- Saving FileSystemInfo Array to File
- Notice: Undefined offset: 1, but there is such offset
- How can I determine the index of the same set of characters between two strings that are of different lengths?
- Caused by: java.lang.ArrayIndexOutOfBoundsException: length=8; index=8
- Pull out first occurrences from array
- How to read a file then store to array and then print?
- C++ won't read in scientific notation data from a .txt file
Related Questions in MULTIDIMENSIONAL-ARRAY
- How to sort a multi-dimensional array by the second array in descending order?
- C programming: Create and write 2D array of files as function
- Working with multiple array in PHP
- PHP multidimensional array, average of duplicate values
- Multiple parameters in a Dictionary
- navigate through multidimensional PHP array by relative path
- How to double values in 2d array? C++
- Multidimensional Array view defined line
- .NET Array with Multiple Data Types
- Multidimensional Array modify values
- Rearrange multidimensional array from other array
- Callback set_message not working with multidimensional array post
- Javascript push multidimensional array only checked checkboxes
- Program crash while trying to print a bidimensional array
- How to extract all 2nd level values (leaf nodes) from a 2-dimensional array and join with commas?
Related Questions in ASSIGN
- Assign And Weak
- Assign the value from a text field into an int variable to do some math with other variables and then return it?
- Hungarian algorithm in PHP with multiple assignments
- Why does it say can't assign to literal in my function?
- verilog assignment results in undefined 'X' output -- why?
- How to set a value to subquery select case variables
- Unable to assign saved values to list from file
- How can I set the text widget contents to the value of a variable in Python/Tkinter?
- R: Using the "names" function on a dataset created within a loop
- Delphi - Use a string variable's name in assignfile()
- Changing the database value based on dropdown list (PHP, MYSQLi)
- How to use multiples objects in a function on R
- Object.assign() - weird behaviour need explanation
- convert char to a specific value in c++
- perl6 Unable to initialize a state variable. Help needed
Related Questions in MULTIPLE-VALUE
- multiple id in radio refresh value sending by ajax
- SQL subquery multiple values, how can i parse each row with a query for every row instead of having all the table displayed?
- how to read multiple values from a field in csv file using python 3
- Replacing proxyAddresses values
- titanium alloy passing multiple values with button
- Java Enum: Take Multiple Values at a Time
- How to properly use Common Lisp's multiple-value-bind and handler-case on this HTTP-request interface?
- Excel - multiple value search across multiple columns or one column with multiple values
- Input line that accepts one and two variables without breaking?
- Easy method to solve multiplication of many numbers followed by division
- return multiple output from option 1 , how to store it at main function and use it for option 3
- Multiple return values of floor in dotimes
- store multiple values in single column in mysql
- Are there any way to use delphi inputbox with multiple values?
- How to assign multiple values at once to multi-dimensional array AFTER creating it - in C?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Since an array is not a modifiable lvalue, it cannot appear on the left side of an assignment. You can initialize it and you can assign individual members via indexing.
And a modifiable
lvalue:So no, you can't do what you want.